List of usage examples for junit.framework Assert assertTrue
static public void assertTrue(boolean condition)
From source file:com.cloudant.sync.util.JSONUtilsTest.java
@Test public void isValidJSON_validMap() { Map obj = new HashMap<String, String>(); obj.put("name", "the great wall"); Assert.assertTrue(JSONUtils.isValidJSON(obj)); }
From source file:com.lemi.mario.download.utils.Proxy.java
/** * Return the proxy host set by the user. * // ww w .j a v a2 s .c om * @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.pamarin.income.spring.PasswordEncryptorT.java
@Test public void test() { String password = "admin"; String encrypted = encryptor.encrypt(password); LOG.debug("password for {} --> {}", password, encrypted); Assert.assertTrue(encryptor.matches(password, encrypted)); }
From source file:org.apache.camel.component.commonj.WorkManagerThreadPoolFactoryTest.java
@Test public void testCustomExecutorService() throws Exception { Assert.assertTrue( context.getExecutorServiceManager().getThreadPoolFactory() instanceof WorkManagerThreadPoolFactory); }
From source file:org.apache.camel.component.commonj.WorkManagerExecutorServiceStrategyTest.java
@Test public void testCustomExecutorService() throws Exception { Assert.assertTrue(context.getExecutorServiceStrategy() instanceof WorkManagerExecutorServiceStrategy); }
From source file:streaming.test.SpringTest.java
@Test public void tessdsk() { Assert.assertTrue(logger1 == logger2); }
From source file:argendata.service.DatasetServiceImplTest.java
@Test public void datasetStoreTest() { try {//from ww w. java 2 s. c om Dataset dataset = DatasetTestFactory.getDataset(); datasetService.store(dataset); Dataset theDataset = datasetService.getApprovedDatasetByName(dataset.getTitleId()); Assert.assertTrue(dataset.getTitle().equals(theDataset.getTitle())); Assert.assertTrue(dataset.getTitleId().equals(theDataset.getTitleId())); Assert.assertTrue(dataset.getLicense().equals(theDataset.getLicense())); Assert.assertTrue(dataset.getAccessURL().equals(theDataset.getAccessURL())); Assert.assertTrue(dataset.getDataQuality().equals(theDataset.getDataQuality())); Assert.assertTrue(dataset.getLocation().equals(theDataset.getLocation())); Assert.assertTrue(dataset.getModified().equals(theDataset.getModified())); Assert.assertTrue(dataset.getDescription().equals(theDataset.getDescription())); Assert.assertTrue(dataset.getSpatial().equals(theDataset.getSpatial())); Assert.assertTrue(dataset.getTemporal().equals(theDataset.getTemporal())); Assert.assertTrue(dataset.getFormat().equals(theDataset.getFormat())); Assert.assertTrue(dataset.getPublisherName().equals(theDataset.getPublisherName())); } catch (Exception e) { e.printStackTrace(); } }
From source file:org.grycap.vmrc.dao.test.VmiDAOTest.java
@Test public void testVmiListSize() throws Exception { try {//from ww w .j av a2s . com Assert.assertTrue(vmiDao.list().size() >= 0); } catch (Exception e) { e.printStackTrace(); } }
From source file:net.idea.opentox.cli.test.DatasetClientTest.java
@Override public void testList() throws Exception { DatasetClient<POLICY_RULE> otClient = getOTClient(); List<IIdentifier> uri = otClient .listURI(new Identifier(String.format("%s%s", TEST_SERVER, Resources.dataset))); Assert.assertTrue(uri.size() > 0); }