Example usage for org.springframework.util Assert isNull

List of usage examples for org.springframework.util Assert isNull

Introduction

In this page you can find the example usage for org.springframework.util Assert isNull.

Prototype

@Deprecated
public static void isNull(@Nullable Object object) 

Source Link

Document

Assert that an object is null .

Usage

From source file:walkAlong.prac2Test.java

@Test
public void notNullTest() {
    Assert.isNull(objPrac2.st1());
}

From source file:com.hp.application.automation.tools.octane.tests.TestAbstractResultQueue.java

public TestAbstractResultQueue() throws IOException {
    Jenkins instance = Jenkins.getInstance();
    if (instance == null) {
        Assert.isNull(instance);
    }/*from  w w  w . j  a v  a 2 s.  c om*/
    File queueFile = new File(instance.getRootDir(), "octane-test-result-queue.dat");
    init(queueFile);
}

From source file:it.geosolutions.geoserver.rest.encoder.coverage.GSJP2KEncoderTest.java

/**
 * TODO implement this test//from  w  w  w .j a  v a 2s . c om
 */
@Test
public void testAll() {
    final GSJP2KEncoder encoder = new GSJP2KEncoder();

    Assert.isNull(encoder.getUseJaiImageRead());

    encoder.setUseMultithreading(true);
    LOGGER.info(encoder.toString());
    Assert.isTrue(encoder.getUseMultithreading());

    encoder.setUseMultithreading(false);

    Assert.isTrue(!encoder.getUseMultithreading());

    encoder.setSuggestedTileSize("512,512");

    Assert.isTrue(encoder.getSuggestedTileSize().equalsIgnoreCase("512,512"));

    LOGGER.info(encoder.toString());

}

From source file:it.geosolutions.geoserver.rest.encoder.coverage.GSImageMosaicEncoderTest.java

/**
 * TODO implement this test/*from   w  w  w .  j a va  2 s . c  o m*/
 */
@Test
public void testAll() {
    final GSImageMosaicEncoder encoder = new GSImageMosaicEncoder();

    Assert.isNull(encoder.getUseJaiImageRead());

    encoder.setAllowMultithreading(true);

    Assert.isTrue(encoder.getAllowMultithreading());

    encoder.setAllowMultithreading(false);

    Assert.isTrue(!encoder.getAllowMultithreading());

    encoder.setSUGGESTED_TILE_SIZE("512,512");

    Assert.isTrue(encoder.getSuggestedTileSize().equalsIgnoreCase("512,512"));

    LOGGER.info(encoder.toString());

    encoder.addSUGGESTED_TILE_SIZE("512,512");

}

From source file:org.mule.modules.automation.testcases.GetProjectDetailTestCases.java

@Category({ RegressionTests.class, SmokeTests.class })
@Test//www .j  a va  2s. c  o  m
public void testGetProjectDetail() throws Exception {
    Project project = runFlowAndGetPayload("get-project-detail");
    Assert.notNull(project);
    Assert.isTrue(project.getIdentifier().contentEquals("operacionesproyectos"));
    Assert.isTrue(project.getName().contentEquals("Proyectos"));
    Assert.isTrue(project.getDescription().contentEquals(""));
    Assert.isTrue(project.getHomepage().contentEquals(""));
    Assert.notNull(project.getTrackers());
    Assert.isTrue(project.getTrackerByName("story").getId() == 6);
    Assert.isTrue(project.getTrackerByName("Evento de proyecto").getId() == 25);
    Assert.isTrue(project.getTrackerByName("Hito proyecto").getId() == 24);
    Assert.isNull(project.getParentId());
}

From source file:es.us.isa.ideas.app.controllers.AbstractController.java

protected void beginTransaction() {
    Assert.isNull(txStatus);

    beginTransaction(false);
}

From source file:org.oncoblocks.centromere.web.test.util.ConverterTests.java

@Test
public void attributeConverterTest() {
    StringToAttributeConverter converter = new StringToAttributeConverter();
    Attribute attribute = converter.convert("key:value");
    Assert.isTrue(attribute.getName().equals("key"));
    Assert.isTrue(attribute.getValue().equals("value"));
    attribute = converter.convert("key");
    Assert.isTrue(attribute.getName().equals("key"));
    Assert.isNull(attribute.getValue());
}

From source file:es.us.isa.ideas.app.controllers.AbstractController.java

protected void beginTransaction(boolean readOnly) {
    Assert.isNull(txStatus);

    DefaultTransactionDefinition definition;

    definition = new DefaultTransactionDefinition();
    definition.setIsolationLevel(DefaultTransactionDefinition.ISOLATION_DEFAULT);
    definition.setPropagationBehavior(DefaultTransactionDefinition.PROPAGATION_REQUIRES_NEW);
    definition.setReadOnly(readOnly);//from  ww w .ja  v  a  2  s.c o  m
    txStatus = transactionManager.getTransaction(definition);
}

From source file:org.oncoblocks.centromere.web.test.util.ConverterTests.java

@Test
public void sourcedAliasConverterTest() {
    StringToSourcedAliasConverter converter = new StringToSourcedAliasConverter();
    SourcedAlias alias = converter.convert("source:alias");
    Assert.isTrue(alias.getSource().equals("source"));
    Assert.isTrue(alias.getName().equals("alias"));
    alias = converter.convert("source");
    Assert.isTrue(alias.getSource().equals("source"));
    Assert.isNull(alias.getName());
}

From source file:cz.muni.fi.airport.tests.AirplaneDaoTest.java

@Test
public void testCreate() {
    Airplane airA = new Airplane();
    airA.setCapacity(1);/*  ww  w  .j a  v a  2 s.  co m*/
    airA.setName("airA");
    airA.setType("typeA");

    Assert.isNull(airA.getId());
    airplaneDao.create(airA);
    Assert.notNull(airplaneDao.findById(airA.getId()));
}