unit testing - spring mvc controller Test with Enumeration value -


I'm trying to test this method:

  @RequestMapping (value = "/ Prsonlstet / {employee} ED" method = Anurodmthkput) public @ Risponsbodi object (update @ Pathwarwybl integer Mpariaidi, @ Rajstperam Mployrstet Impestet) throws exception (staff services). Offshore Employee (Entity Manager.Fund (Employee Employee, Employee), Imprest); Return tap; }   

EmplyeeState are saved in the DB as an enumeration, integer values, it is my test code:

  @Test public void EmployeeTest () throws exception {mockMvc.perform (MockMvcRequestBuilders.put ( "/ PersonalState / {empstate}", EmplyeeState.PERMANENT) ultimate ( "EmployeeID", "550")) .andDo (print ()) .andExpect (MockMvcResultMatchers.status () .Okay()); }   

I found this errror:

  resolve exception: Type = org.springframework.beans.TypeMismatchException MockHttpServletResponse: level = 400   

I tried to pass two variables as parameters, was only passed as employee ID parameter, but I still have the same error also param parameter should be both string. any idea?

The problem is solved I passed the value as enum string value.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -