mercredi 14 février 2018

MockMvc expected Entity{field, field} but obtained {field, field}

i'm making a test of a Client, specifically i'm getting all clients, and i have this piece of code:

ClientMockMvc.perform(get("/clients?sort=id,desc"))
        .andExpect(status().isOk())
        .andExpect(jsonPath("$.[*].location").value(DEFAULT_LOCATION))

But i got this error:

Expected: Location{id=974351, street='AAAAA', number='AAAA', province={id= 974251, desc="AAAA"}}

Actual: {id=974351, street='AAAAA', number='AAAA', province={id= 974251, desc="AAAA"}}

I can't find a workaround for this, anyone has an idea? Am i doing something wrong? Thanks in advance!

Aucun commentaire:

Enregistrer un commentaire