Example usage for junit.framework Assert assertTrue

List of usage examples for junit.framework Assert assertTrue

Introduction

In this page you can find the example usage for junit.framework Assert assertTrue.

Prototype

static public void assertTrue(boolean condition) 

Source Link

Document

Asserts that a condition is true.

Usage

From source file:org.atemsource.atem.impl.common.attribute.SingleAssociationAttributeTest.java

@Test
public void testAttributeType() {
    EntityA entity = new EntityA();
    Assert.assertTrue(
            entityTypeRepository.getEntityType(entity).getAttribute(PROPERTY) instanceof SingleAttribute);
}

From source file:org.openmrs.web.controller.maintenance.SystemInformationControllerTest.java

/**
 * @see SystemInformationController#showPage(ModelMap)
 *//*  ww w . j av a2  s .  c  o  m*/
@Test
@Verifies(value = "should add openmrs information attribute to the model map", method = "showPage()")
public void showPage_shouldReturnOpenmrsInformation() {
    Assert.assertTrue(((Map<String, Map<String, String>>) model.get("systemInfo"))
            .containsKey("SystemInfo.title.openmrsInformation"));
}

From source file:org.urbantower.j4s.example.simple.SimpleJettyTest.java

@Test
public void isJettyServerRunning() throws InterruptedException, IOException {
    CloseableHttpResponse response = httpclient.execute(new HttpGet("http://localhost:9090"));
    String body = EntityUtils.toString(response.getEntity());
    Assert.assertTrue(body.contains("Powered by Jetty"));
}

From source file:org.urbantower.j4s.example.webapp.WebAppTest.java

@Test
public void isJettyServerRunning() throws InterruptedException, IOException {
    CloseableHttpResponse response = httpclient.execute(new HttpGet("http://localhost:9092/webapp/servlet"));
    String body = EntityUtils.toString(response.getEntity());
    Assert.assertTrue(body.contains("Hello Servlet"));
}

From source file:org.urbantower.j4s.example.servlet.ServletTest.java

@Test
public void isJettyServerRunning() throws InterruptedException, IOException {
    CloseableHttpResponse response = httpclient.execute(new HttpGet("http://localhost:9095/webapp/servlet"));
    String body = EntityUtils.toString(response.getEntity());
    Assert.assertTrue(body.contains("Hello Servlet"));
}

From source file:org.openspaces.itest.esb.mule.config.ConnectorConfigPropertiesFileTests.java

@Test
public void testConnectorConfig() throws Exception {
    ApplicationContext context = muleContext.getRegistry()
            .lookupObject(SpringRegistry.SPRING_APPLICATION_CONTEXT);
    OpenSpacesQueueConnector connector = (OpenSpacesQueueConnector) context.getBean("queueConnector");
    Assert.assertNotNull(connector);/*from www  . jav a 2  s  .c  o m*/
    Assert.assertEquals(Integer.valueOf(100), connector.getBatchSize());
    Assert.assertEquals(60000L, connector.getTimeout());
    Assert.assertTrue(connector.isFifo());
    Assert.assertFalse(connector.isPersistent());
}

From source file:com.epam.training.storefront.facade.DefaultCheckoutFacadeIntegrationTest.java

@Test
public void testCardTypeConversion() throws CommerceCartModificationException {
    final Collection<CardTypeData> original = checkoutFacade.getSupportedCardTypes();
    final Collection<CardTypeData> creditCards = checkoutFacade.getSupportedCardTypes();
    if (creditCardFacade.mappingStrategy(creditCards)) {
        Assert.assertFalse(CollectionUtils.isEqualCollection(original, creditCards));
    } else {/*www .  j a  v a 2 s.c  o  m*/
        Assert.assertTrue(CollectionUtils.isEqualCollection(original, creditCards));
    }
}

From source file:com.fluke.parser.YahooIntradayParserTest.java

@Test
public void testGetDataWithSpecialCharInName() {
    YahooIntradayParser parser = new YahooIntradayParser();
    IntradayDetails details = parser.getIntradayDetails("m&m");
    Assert.assertTrue(details.getMeta().getCompanyName().contains("MAHINDRA"));
}

From source file:net.idea.opentox.cli.test.DatasetClientTest.java

@Test
public void testGetDatasetList() throws Exception {
    DatasetClient<POLICY_RULE> otClient = getOTClient();
    List<Dataset> datasets = otClient
            .getJSON(new Identifier(String.format("%s%s", TEST_SERVER, Resources.dataset)));
    Assert.assertNotNull(datasets);//w ww .j  a  v  a2  s . c  om
    Assert.assertTrue(datasets.size() > 0);
    for (Dataset dataset : datasets) {
        Assert.assertNotNull(dataset.getResourceIdentifier());
        Assert.assertNotNull(dataset.getMetadata().getTitle());
    }
}

From source file:org.urbantower.j4s.example.springmvc.SpringMvcTest.java

@Test
public void isJettyServerRunning() throws InterruptedException, IOException {
    CloseableHttpResponse response = httpclient.execute(new HttpGet("http://localhost:9091/webapp/helloworld"));
    String body = EntityUtils.toString(response.getEntity());
    Assert.assertTrue(body.contains("Hello World!"));
}