List of usage examples for junit.framework Assert assertNotNull
static public void assertNotNull(Object object)
From source file:com.indoqa.maven.wadldoc.transformation.Wadl2HtmlPipelineTest.java
@Test public void stylesheet() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); new Wadl2HtmlPipeline(this.getClass().getResource("wadl.xml"), "stylesheet.css", true).execute(baos); Assert.assertNotNull(baos); Diff diff = createDiff("test2-result.html", baos); Assert.assertTrue("Pieces of XML are not identical. " + diff, diff.similar()); }
From source file:com.ace.erp.dao.PermissionMapperTest.java
@Test public void getRRPList() { List<RoleResourcePermission> rrpList = rrpMapper.getRRPListByRId(5); for (RoleResourcePermission rrp : rrpList) { System.out.println(rrp.toString()); }// w ww. j a va 2 s . c o m Assert.assertNotNull(rrpList); }
From source file:com.baidu.jprotobuf.rpc.client.IDLProxyFactoryBeanTest.java
protected ServiceExporter doCreateServiceExporter() { IDLServiceExporter exporter = new IDLServiceExporter(); exporter.setInputIDL(resource);/*from ww w .java 2s . c o m*/ exporter.setOutputIDL(resource); exporter.setServiceName("SimpleIDLTest"); exporter.setInvoker(new ServerInvoker() { @Override public void invoke(IDLProxyObject input, IDLProxyObject output) throws Exception { Assert.assertNotNull(input); Assert.assertEquals("how are you!", input.get("list")); if (output != null) { output.put("list", "hello world"); } } }); try { exporter.afterPropertiesSet(); } catch (Exception e) { e.printStackTrace(); } return exporter; }
From source file:org.jasig.ssp.util.importer.job.twodottwo.HeaderOnlyTest.java
@SuppressWarnings("unchecked") @Test/*from w w w. j a v a2 s .c om*/ public void testJob() throws Exception { JobExecution jobExecution = jobLauncherTestUtils.launchJob(); Map<String, ReportEntry> report = (Map<String, ReportEntry>) jobExecution.getExecutionContext() .get("report"); Assert.assertNotNull(report); Set<Entry<String, ReportEntry>> entrySet = report.entrySet(); Assert.assertEquals(1, entrySet.size()); for (Entry<String, ReportEntry> entry : entrySet) { Assert.assertEquals(new Integer(0), entry.getValue().getNumberParsed()); Assert.assertEquals(new Integer(0), entry.getValue().getNumberSkippedOnParse()); Assert.assertEquals(new Integer(0), entry.getValue().getNumberSkippedOnDatabaseWrite()); Assert.assertEquals(new Integer(0), entry.getValue().getNumberInsertedUpdated()); } }
From source file:com.lambdasoup.panda.PandaTest.java
@Test public void getProfilesTest() { Collection<Profile> profiles = this.panda.getProfiles(); Assert.assertNotNull(profiles); }
From source file:org.openmrs.module.formfilter.web.controller.ViewFormFilterControllerTest.java
/** * @see {@link ViewFormFilterController#viewFormFilter(ModelMap, Integer, Integer)} *//*from w w w . j a v a 2 s . c o m*/ @Test @Verifies(value = "should return FormFilter by form id", method = "viewFormFilter(ModelMap, Integer, Integer)") public void viewFormFilter_ShouldReturnFormFilterByFormId() { ViewFormFilterController controller = new ViewFormFilterController(); ModelMap model = new ModelMap(); controller.viewFormFilter(model, "1", null); Assert.assertNotNull(((FormFilter) model.get("formfilter"))); }
From source file:de.tudarmstadt.ukp.dkpro.wsd.si.dictionary.GoogleDictionaryTest.java
@Test public void testGoogleDictionary() throws Exception { FileUtils.deleteQuietly(new File(output)); GoogleDictionary dictionary = new GoogleDictionary(path, needed_mentions); Assert.assertNotNull(dictionary); ObjectOutputStream dictionaryWriter = new ObjectOutputStream( new BZip2CompressorOutputStream(new FileOutputStream(output))); dictionaryWriter.writeObject(dictionary); dictionaryWriter.close();/*from ww w. ja v a 2 s .c o m*/ Assert.assertTrue(new File(output).exists()); ObjectInputStream dictionaryReader = new ObjectInputStream( new BZip2CompressorInputStream(new FileInputStream(output))); dictionary = null; dictionary = (GoogleDictionary) dictionaryReader.readObject(); Assert.assertNotNull(dictionary); System.out.println(dictionary.getNumberOfMentionEntityPairs()); System.out.println(dictionary.getTargetSize()); Assert.assertEquals(3, dictionary.getTargetValuePairs("claude_monet").size()); dictionaryReader.close(); }
From source file:org.codehaus.grepo.query.hibernate.repository.HibernateRepositoryTest.java
@Test public void testWithNamedQuery() { Assert.assertNotNull(repo.getByUsername("username")); }
From source file:org.codehaus.grepo.query.jpa.generator.GeneratorRepositoryTest.java
@Test public void testWithSQLGeneratorUsingDynParams() { Assert.assertNotNull(repo.getWithNativeGeneratorUsingDynParams()); }
From source file:org.web4thejob.orm.TypeSerailizationTest.java
@Test public void marshallingQueryTest() throws XmlMappingException, IOException { final Marshaller marshaller = ContextUtil.getBean(Marshaller.class); Assert.assertNotNull(marshaller); final ByteArrayOutputStream out = new ByteArrayOutputStream(); final Result result = new StreamResult(out); final Query query1 = entityFactory.buildQuery(Master1.class); query1.setName("123"); query1.setOwner(ContextUtil.getBean(SecurityService.class).getAdministratorIdentity()); ContextUtil.getDWS().save(query1);// w w w. ja v a2 s . co m marshaller.marshal(query1, result); final Unmarshaller unmarshaller = ContextUtil.getBean(Unmarshaller.class); final Query query2 = (Query) unmarshaller .unmarshal(new StreamSource(new ByteArrayInputStream(out.toByteArray()))); Assert.assertEquals(query1, query2); }