Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3224

Generate unit or integration tests for controllers

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.2.2.RELEASE
    • Fix Version/s: None
    • Component/s: TESTING

      Description

      Generate integration tests for controllers using the spring-test-mvc framework.
      Prolly want to wait until spring-test-mvc is out of milestone.

      Here is an example:

      		this.mockMvc.perform(get("/entity/").accept(MediaType.TEXT_HTML))
      		.andExpect(status().isOk())
      		.andExpect(model().attribute("entity", "M/d/yy h:mm a"))
      		.andExpect(model().attribute("entities", notNullValue()))
      		.andExpect(model().attribute("entities", hasSize(2)))
      		.andDo(print());
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            lithium147 Tim
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: