List of usage examples for junit.framework Assert assertNotNull
static public void assertNotNull(Object object)
From source file:org.codehaus.grepo.query.hibernate.repository.HibernateRepositoryStatisticsTest.java
@Test public void testStatisticsWithNamedQuery() { Assert.assertNotNull(repo.getByUsername("username")); Assert.assertEquals(1, collection.size()); repo.get(-1L);/*from ww w.j a v a 2 s. c o m*/ Assert.assertEquals(2, collection.size()); }
From source file:org.jasig.ssp.util.importer.job.twodottwo.ReportExistsTest.java
@Test public void testJob() throws Exception { JobExecution jobExecution = jobLauncherTestUtils.launchJob(); Assert.assertNotNull(jobExecution.getExecutionContext().get("report")); }
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); Assert.assertTrue(datasets.size() > 0); for (Dataset dataset : datasets) { Assert.assertNotNull(dataset.getResourceIdentifier()); Assert.assertNotNull(dataset.getMetadata().getTitle()); }//w ww. j a va 2 s . c o m }
From source file:com.verigreen.rest.TestSubmitBranchRequest.java
@Test public void testCreateSubmitBranchRequest() { BranchDescriptor branchData = new BranchDescriptor(); branchData.setCommitter("test@email.com"); branchData.setProtectedBranch("protected-branch"); branchData.setNewBranch("test-branch"); CreateBranchRequest submitBranchRequest = GitHookApi.getCreateBranchRequest(branchData); Assert.assertNotNull(submitBranchRequest); Assert.assertEquals(submitBranchRequest.getEntity(), branchData); Assert.assertEquals(submitBranchRequest.getUri(), CollectorApi.getCollectorAddress() + "/branches"); }
From source file:org.atemsource.atem.impl.pojo.PrimitiveCollectionAssociationAttributeTest.java
@Test public void testGetCount() { EntityType entityType = entityTypeRepository.getEntityType(EntityA.class); CollectionAttribute attribute = (CollectionAttribute) entityType.getAttribute("objectList"); Assert.assertNotNull(attribute); EntityA a = new EntityA(); a.setObjectList(new ArrayList()); a.getObjectList().add(new Object()); a.getObjectList().add(new Object()); Assert.assertEquals(attribute.getSize(a), 2); }
From source file:org.slc.sli.dashboard.unit.controller.SearchControllerTest.java
@Test public void testHandle() throws Exception { // test good search try {//from www . ja v a2s.c o m Assert.assertNotNull(searchController.handle(new StudentSearch("M", "S", ""), request)); } catch (Exception e) { Assert.fail("Should pass but getting " + e.getMessage()); } }
From source file:org.codehaus.grepo.query.jpa.generator.GeneratorRepositoryTest.java
@Test public void testWithJPQLGeneratorUsingDynParams() { Assert.assertNotNull(repo.getWithJPQLGeneratorUsingDynParams()); }
From source file:com.taobao.ad.jpa.test.JobUserSubTest.java
@Test public void findJobUserSub() { Assert.assertNotNull(jobUserSubBO.findJobUserSub("110", "dtJustTest", null, 0)); }
From source file:com.googlecode.t7mp.steps.ConfigFilesSequenceTest.java
@Before public void setUp() { catalinaBaseDir = Files.createTempDir(); Assert.assertTrue(catalinaBaseDir.exists()); Assert.assertNotNull(catalinaBaseDir); Assert.assertTrue(catalinaBaseDir.exists()); confDirectory = new File(catalinaBaseDir, "/conf/"); boolean confDirCreated = confDirectory.mkdirs(); Assert.assertTrue(confDirCreated);/*w w w . j a v a 2 s . c o m*/ Assert.assertNotNull(confDirectory); Assert.assertTrue(confDirectory.exists()); }
From source file:philaman.cput.cardealer.test.repository.MechanicRepositoryTest.java
@Test public void createMechanic() { repo = ctx.getBean(MechanicRepository.class); Address address = new Address.Builder("S74").street("Siyota Street").suburb("Khayelitsha").city("Cape Town") .province("Western Cape").postalCode("7088").build(); Contact contact = new Contact.Builder("0215645").cell("0739452541").phone("0215462145") .email("ManPhi@Liam.com").build(); Mechanic mechanic = new Mechanic.Builder("Electricity Installation").firstname("Phila").lastname("Manyika") .ratings("Professional").address(address).contact(contact).build(); repo.save(mechanic);/*from www .j a va 2 s . c o m*/ id = mechanic.getId(); Assert.assertNotNull(mechanic); }