Java 类org.springframework.boot.test.IntegrationTest 实例源码

项目:mojito    文件:PollableTaskWSTest.java   
@Test
@Category(IntegrationTest.class)
public void testGetPollableTask() throws Exception {

    String pollableTaskName = "testGetPollableTask";
    PollableTask parentTask = pollableTaskService.createPollableTask(null, pollableTaskName, null, 0);
    com.box.l10n.mojito.rest.entity.PollableTask pollableTask = pollableTaskClient.getPollableTask(parentTask.getId());

    assertEquals(pollableTaskName, pollableTask.getName());
    assertNull(pollableTask.getFinishedDate());
    assertFalse(pollableTask.isAllFinished());
}
项目:Ratel    文件:RatelIntegrationTestExecutionListener.java   
/**
 * Configures the context in such a way that the service registy server has a
 * new unique port, and all provided application contexts are configured to
 * use it. It also copies properites provided in {@link RatelTest#value()} and
 * {@link IntegrationTest#value()} annotations.
 *
 * @param testContext
 *          the TestContext of a test
 */
@Override
public void prepareTestInstance(TestContext testContext) {

  applyPropertiesFromAnnotation(testContext, IntegrationTest.class.getName());
  applyPropertiesFromAnnotation(testContext, RatelTest.class.getName());

  int servicePort = RatelTestContext.getServiceDiscoveryPort(); // hardcoded, can
                                                             // be changed to
                                                             // finding free
                                                             // tcp port
  applyServiceRegistryProperties(testContext, servicePort);
}
项目:Ratel    文件:RatelIntegrationTestExecutionListener.java   
private void addIntegrationTestProperty(Collection<String> propertySourceProperties) {
  propertySourceProperties.add(IntegrationTest.class.getName() + "=true");
}