List of usage examples for junit.framework Assert assertNull
static public void assertNull(Object object)
From source file:$.DummyDaoImplTest.java
@Test public void delete() { Dummy d = new Dummy(); dummyDao.create(d); dummyDao.delete(d); Assert.assertNull(dummyDao.find(d.getId())); }
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);/* w w w. ja v a 2 s . co m*/ 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:piecework.util.ContentUtilityTest.java
@Test public void contentHandlerKeyNullProfile() throws PieceworkException { ContentProfile contentProfile = null; ContentProfileProvider modelProvider = new ProcessDeploymentProviderStub(contentProfile); Assert.assertNull(ContentUtility.contentHandlerKey(modelProvider)); }
From source file:ejportal.webapp.filter.StaticFilterTest.java
/** * Test filter doesnt forward when path matches. * /*from w w w .j ava2 s . com*/ * @throws Exception * the exception */ public void testFilterDoesntForwardWhenPathMatches() throws Exception { final MockHttpServletRequest request = new MockHttpServletRequest("GET", "/scripts/dojo/test.html"); final MockHttpServletResponse response = new MockHttpServletResponse(); final MockFilterChain chain = new MockFilterChain(); this.filter.doFilter(request, response, chain); Assert.assertNull(chain.getForwardURL()); }
From source file:de.itsvs.cwtrpc.controller.config.RemoteServiceModuleConfigBeanDefinitionParserTest.java
@Test public void test1() { RemoteServiceModuleConfig config;//from ww w. jav a2 s .c o m config = appContext.getBean("serviceModule101", RemoteServiceModuleConfig.class); Assert.assertEquals("myModule5", config.getName()); Assert.assertNull(config.getResponseCompressionEnabled()); Assert.assertNull(config.getRpcTokenProtectionEnabled()); Assert.assertNull(config.getRpcTokenValidatorName()); Assert.assertEquals(0, config.getServiceGroupConfig().getServiceConfigs().size()); Assert.assertEquals(0, config.getServiceGroupConfig().getChildGroupConfigs().size()); }
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);/*from w ww . j ava 2 s. co m*/ Assert.assertEquals(attributeUuid, PropertyUtils.getProperty(result, "uuid")); Assert.assertEquals("", PropertyUtils.getProperty(result, "value")); Assert.assertNull(PropertyUtils.getProperty(result, "auditInfo")); }
From source file:com.vmware.identity.sts.auth.impl.BETAuthenticatorTest.java
@Test public void testNoBET() { com.vmware.identity.sts.idm.Authenticator idmAuth = noCalledIDMAuth(); final Authenticator authenticator = new BETAuthenticator(idmAuth); final RequestSecurityTokenType rst = new RequestSecurityTokenType(); Assert.assertNull(authenticator.authenticate(newReq(rst))); rst.setBinaryExchange(new BinaryExchangeType()); Assert.assertNull(authenticator.authenticate(newReq(rst))); EasyMock.verify(idmAuth);/*from www .j ava 2 s . c o m*/ }
From source file:ejportal.webapp.action.SigelActionTest.java
/** * Test edit./*from w w w . j a va2 s .co m*/ * * @throws Exception * the exception */ public void testEdit() throws Exception { this.log.debug("testing edit..."); this.action.setSigelId(1L); Assert.assertNull(this.action.getSigel()); Assert.assertEquals("edit", this.action.edit()); Assert.assertNotNull(this.action.getSigel()); Assert.assertFalse(this.action.hasActionErrors()); }
From source file:org.netxilia.spi.impl.format.TestStyleService.java
@Test public void testSet() throws NetxiliaResourceException, NetxiliaBusinessException { Styles style = styleService.applyStyle(new WorkbookId("SYSTEM"), Styles.valueOf("b i"), Styles.valueOf("u s"), StyleApplyMode.set); Assert.assertEquals(Styles.valueOf("u s"), style); style = styleService.applyStyle(new WorkbookId("SYSTEM"), Styles.valueOf("b i"), null, StyleApplyMode.set); Assert.assertNull(style); }
From source file:ejportal.webapp.action.PaketActionTest.java
/** * Test edit./* w w w. java 2 s. com*/ * * @throws Exception * the exception */ public void testEdit() throws Exception { this.log.debug("testing edit..."); this.action.setPaketId(1L); Assert.assertNull(this.action.getPaket()); Assert.assertEquals("edit", this.action.edit()); Assert.assertNotNull(this.action.getPaket()); Assert.assertFalse(this.action.hasActionErrors()); }