org.springframework.boot.test.IntegrationTest Java Examples

The following examples show how to use org.springframework.boot.test.IntegrationTest. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PollableTaskWSTest.java    From mojito with Apache License 2.0 5 votes vote down vote up
@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());
}
 
Example #2
Source File: RatelIntegrationTestExecutionListener.java    From Ratel with Apache License 2.0 5 votes vote down vote up
/**
 * 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);
}
 
Example #3
Source File: RatelIntegrationTestExecutionListener.java    From Ratel with Apache License 2.0 4 votes vote down vote up
private void addIntegrationTestProperty(Collection<String> propertySourceProperties) {
  propertySourceProperties.add(IntegrationTest.class.getName() + "=true");
}