コード例 #1
0
  @Test
  public void testImport() throws Exception {
    createRequisition();

    final MockEventProxy eventProxy = getEventProxy();
    eventProxy.resetEvents();

    sendRequest(PUT, "/requisitions/test/import", 303);

    assertEquals(1, eventProxy.getEvents().size());
  }
コード例 #2
0
  @Test
  public void testImportNoRescan() throws Exception {
    createRequisition();

    final MockEventProxy eventProxy = getEventProxy();
    eventProxy.resetEvents();

    sendRequest(PUT, "/requisitions/test/import", parseParamData("rescanExisting=false"), 303);

    assertEquals(1, eventProxy.getEvents().size());
    final Event event = eventProxy.getEvents().get(0);
    final List<Parm> parms = event.getParmCollection();
    assertEquals(2, parms.size());
    assertEquals("false", parms.get(1).getValue().getContent());
  }