Examples of MockMvc


Examples of org.springframework.test.web.servlet.MockMvc

  public void receiveUpdate_manyUpdatesSingleSubscription() throws Exception {
    TestUpdateHandler handler = new TestUpdateHandler();
    List<UpdateHandler> handlers = new ArrayList<UpdateHandler>();
    handlers.add(handler);
    RealTimeUpdateController controller = new RealTimeUpdateController(new HashMap<String, String>(), handlers, "shhhhh!!!!");
    MockMvc mockMvc =
        standaloneSetup(controller)
        .build();
    mockMvc.perform(post("/realtime/facebook/foo")
              .contentType(APPLICATION_JSON)
              .content(jsonFromFile("rtupdate-many"))
              .header("X-Hub-Signature", "sha1=816505e95f33287950e8992488637871085164c2"))
      .andExpect(content().string(""));
    MultiValueMap<String, RealTimeUpdate> updates = handler.getUpdates();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.