List of usage examples for junit.framework Assert assertNotNull
static public void assertNotNull(Object object)
From source file:com.devwebsphere.wxs.jdbcloader.TestJDBCLoader.java
@BeforeClass static void setup() throws Exception { Class.forName(EmbeddedDriver.class.getName()); BasicDataSource ds = new BasicDataSource(); ds.setDriverClassName(EmbeddedDriver.class.getName()); ds.setUrl("jdbc:derby:derbyDB;create=true"); Connection connTest = ds.getConnection(); Assert.assertNotNull(connTest); connTest.close();/*from w w w .jav a2 s.c om*/ }
From source file:de.mayflower.filmmarket.domain.ShortFormIntegrationTest.java
@Test public void testShortForm() { ShortForm shortForm = new ShortForm(); shortForm.setLicensee("Lizenznehmer"); shortForm.setLicensor("Lizenzgeber"); shortForm.setLicensefee(50L);//from w w w .j a v a 2 s . co m shortForm.persist(); shortForm.flush(); shortForm.clear(); Assert.assertNotNull(shortForm.getId()); Assert.assertEquals("Lizenznehmer", shortForm.getLicensee()); Assert.assertTrue(50L == shortForm.getLicensefee()); }
From source file:amqp.spring.camel.component.SpringAMQPComponentTest.java
@Test public void testCreateContext() throws Exception { Component component = context().getComponent("spring-amqp", SpringAMQPComponent.class); Assert.assertNotNull(component); }
From source file:com.lemi.mario.download.utils.Proxy.java
/** * Return the proxy host set by the user. * //from w ww .java 2 s.co m * @param ctx A Context used to get the settings for the proxy host. * @return String containing the host name. If the user did not set a host * name it returns the default host. A null value means that no * host is to be used. */ static final public String getHost(Context ctx) { ContentResolver contentResolver = ctx.getContentResolver(); Assert.assertNotNull(contentResolver); String host = Settings.Secure.getString(contentResolver, Settings.Secure.HTTP_PROXY); if (host != null) { int i = host.indexOf(':'); if (i == -1) { if (DEBUG) { Assert.assertTrue(host.length() == 0); } return null; } return host.substring(0, i); } return getDefaultHost(); }
From source file:com.dianping.lion.dao.ibatis.UserIbatisDaoTest.java
@Test public void testGetTeams() { List<User> users = userDao.findAll(); Assert.assertNotNull(users); }
From source file:com.nkosy.designpatterns.creational.prototypepattern.PrototypePatternTest.java
@Test public void cloneObject() { Person person1 = new Person("Fred"); Assert.assertNotNull(person1); Person person2 = (Person) person1.doClone(); Assert.assertNotNull(person2);//from w w w .java 2s. c o m Dog dog1 = new Dog("Woooof!"); Assert.assertNotNull(dog1); Dog dog2 = (Dog) dog1.doClone(); Assert.assertNotNull(dog1); }
From source file:com.taobao.ad.jpa.test.JobTest.java
@Test public void testGetJobList() { JobDO job = new JobDO(); job.setJobname("http-dumpJoinedCpsShopKeeperToFile-53274"); job.setJobgroup("170"); Assert.assertNotNull(jobBO.jobList(job)); }
From source file:Project4Test.java
@Test public void nonNullTest() { Assert.assertNotNull(service); }
From source file:FileListItemAdapterTests.java
@Test public void test() { adapter = new FTPListItemAdapter(); FTPFile f = new FTPFile(); f.setName("a"); f.setType(FTPFile.DIRECTORY_TYPE);/*from www. j a va2 s .c o m*/ FileListItem tested = adapter.getFileListItem(f); Assert.assertNotNull(tested); Assert.assertEquals("a", tested.getLabel()); Assert.assertEquals(FileListItemTypes.DIRECTORY, tested.getType()); }
From source file:com.taobao.ad.jpa.test.SchedulerTest.java
@Test public void testFindSchedulers() { SchedulerDO schedulerDO = new SchedulerDO(); for (SchedulerDO s : schedulerDAO.findSchedulers(schedulerDO)) { System.out.println(s.getInstanceName()); }//from w w w. j av a2 s.co m Assert.assertNotNull(schedulerDAO.findSchedulers(schedulerDO)); }