Example usage for junit.framework Assert assertNotNull

List of usage examples for junit.framework Assert assertNotNull

Introduction

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

Prototype

static public void assertNotNull(Object object) 

Source Link

Document

Asserts that an object isn't null.

Usage

From source file:org.ngrinder.agent.service.AgentManagerServiceTest.java

@Test
public void testSaveGetDeleteAgent() {
    AgentInfo agent = saveAgent("save");
    AgentInfo agent2 = agentManagerService.getOne(agent.getId());
    Assert.assertNotNull(agent2);

    List<AgentInfo> agentListDB = agentManagerService.getAllLocal();
    Assert.assertNotNull(agentListDB);/* w ww  .  ja va 2s .  c  o  m*/

    agentManagerService.approve(agent.getId(), true);

    agentRepository.delete(agent.getId());
    agent2 = agentManagerService.getOne(agent.getId());
    Assert.assertNull(agent2);
}

From source file:org.openmrs.module.webservices.rest.web.v1_0.controller.PersonNameControllerTest.java

@Test
public void shouldGetAPersonName() throws Exception {
    Object result = controller.retrieve(personUuid, nameUuid, request);
    Assert.assertNotNull(result);
    Assert.assertEquals("Super", PropertyUtils.getProperty(result, "givenName"));
    Assert.assertEquals("User", PropertyUtils.getProperty(result, "familyName"));
    Assert.assertNull(PropertyUtils.getProperty(result, "auditInfo"));
    Assert.assertNotNull(PropertyUtils.getProperty(result, "uuid"));
}

From source file:org.atemsource.atem.impl.pojo.PrimitiveCollectionAssociationAttributeTest.java

@Test
public void testTargetType() {
    EntityType entityType = entityTypeRepository.getEntityType(EntityA.class);
    CollectionAttribute attribute = (CollectionAttribute) entityType.getAttribute("stringList");
    Assert.assertNotNull(attribute);
    Assert.assertEquals(String.class, attribute.getTargetType().getJavaType());
}

From source file:com.lambdasoup.panda.PandaTest.java

@Test
public void postProfileTest() {
    Profile profile = new Profile();

    profile.presetName = "h264";

    Profile profileResponse = this.panda.postProfile(profile);

    Assert.assertNotNull(profileResponse);
}

From source file:org.mifos.user.repository.StandardOfficeDaoTest.java

@BeforeMethod
void setUp() throws DataSetException, IOException, SQLException, DatabaseUnitException {
    officeDaoTestHelper = new OfficeDaoTestHelper(officeDao);
    Assert.assertNotNull(this.dataSource);
    insertOfficeDataSet();// w  ww.j ava  2  s  . co  m
}

From source file:org.openmrs.module.webservices.rest.web.v1_0.controller.PersonAttributeControllerTest.java

@Test
public void shouldGetAPersonAttribute() throws Exception {
    Object result = controller.retrieve(personUuid, attributeUuid, request);
    Assert.assertNotNull(result);
    Assert.assertEquals(attributeUuid, PropertyUtils.getProperty(result, "uuid"));
    Assert.assertEquals("", PropertyUtils.getProperty(result, "value"));
    Assert.assertNull(PropertyUtils.getProperty(result, "auditInfo"));
}

From source file:org.mifos.user.repository.StandardOfficeLevelDaoTest.java

@BeforeMethod
void setUp() throws DataSetException, IOException, SQLException, DatabaseUnitException {
    officeLevelDaoTestHelper = new OfficeLevelDaoTestHelper(officeLevelDao);
    Assert.assertNotNull(this.dataSource);
    insertOfficeLevelDataSet();//w ww. j  ava  2s . c om
}

From source file:gov.nih.nci.integration.transformer.XSLTTransformerTest.java

/**
 * Testcase for transforming Wrapper XML to Interim XML
 * //from   w  ww  . j  ava2s  .  c  om
 * @throws IntegrationException - IntegrationException
 */
@Test
public void transformWrapperToInterimXMLTest() throws IntegrationException {
    xsltTransformer.initTransformer("caCISRequest-to-MsgBroadcasterParticipantInboundMsg.xsl", baseXSLPath);
    final String trnsfrmdMsg = transformToParticipantXML(getParticipantWrapperXML());
    Assert.assertNotNull(trnsfrmdMsg);
}

From source file:org.codehaus.grepo.query.hibernate.repository.HibernateRepositoryTest.java

@Test
public void testWithSpecifiedNativeQuery() {
    Assert.assertNotNull(repo.getByUsernameWithSpecifiedNativeQuery("username"));
}

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

@Test
public void testGetter() {
    EntityA entity = new EntityA();
    final ArrayList<EntityB> list = new ArrayList<EntityB>();
    entity.setList(list);//  ww  w  .j  a  v  a  2s.co  m
    entity.getList().add(createEntity("Hallo", 2));
    entity.getList().add(createEntity("tst", 3));

    Attribute attribute = getAttribute(PROPERTY);
    Assert.assertNotNull(attribute);
    Object value = attribute.getValue(entity);
    assertEquals(list, value);
    Assert.assertTrue(list == value);

}