Example usage for org.springframework.util Assert notNull

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

Introduction

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

Prototype

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

Source Link

Document

Assert that an object is not null .

Usage

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

@Category({ RegressionTests.class, SmokeTests.class })
@Test//from  ww  w. j av  a  2  s  .c o m
public void testGetUserDetail() throws Exception {
    User user = runFlowAndGetPayload("get-user-detail");
    Assert.notNull(user);
    Assert.isTrue(user.getId() == 15);
    Assert.isTrue(user.getFirstName().contentEquals("Ana Paula"));
    Assert.isTrue(user.getLastName().contentEquals("Lo Turco"));
    Assert.isTrue(user.getMail().contentEquals("anapaulal@epidataconsulting.com"));
    Assert.notNull(user.getMemberships());

}

From source file:org.springsource.restbucks.payment.PaymentException.java

public PaymentException(Order order, String message) {

    super(message);

    Assert.notNull(order);
    this.order = order;
}

From source file:com.travelport.restneohack.model.domain.PaymentType.java

public PaymentType(AccountView accountView, FormOfPayment formOfPayment, int amount) {
    Assert.notNull(formOfPayment);
    Assert.notNull(accountView);//from  w  w w . jav a  2  s.c o  m

    this.accountView = accountView;
    this.formOfPayment = formOfPayment;
    this.amount = amount;
}

From source file:com.wiiyaya.framework.provider.repository.revision.entity.DefaultRevisionMetadata.java

public DefaultRevisionMetadata(DefaultRevisionEntity entity) {

    Assert.notNull(entity);
    this.entity = entity;
}

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

@Category({ RegressionTests.class, SmokeTests.class })
@Test//from  www .  j a  va  2s  . co  m
public void testGetRoles() throws Exception {
    Collection<Role> roles = runFlowAndGetPayload("get-roles");
    Assert.notNull(roles);
    Assert.notEmpty(roles);
}

From source file:com.iterzp.momo.service.impl.RSAServiceImpl.java

@Override
@Transactional(readOnly = true)//w w  w .  ja  va2 s . c o m
public RSAPublicKey generateKey(HttpServletRequest request) {
    Assert.notNull(request);
    KeyPair keyPair = RSAUtils.generateKeyPair();
    RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic();
    RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate();
    HttpSession session = request.getSession();
    session.setAttribute(PRIVATE_KEY_ATTRIBUTE_NAME, privateKey);
    return publicKey;
}

From source file:org.openmrs.module.sync.SyncUtilTest.java

@Test
public void getSetterMethod_shouldReturnMethodForPrimitiveInt() {
    Method m = SyncUtil.getSetterMethod(new Xform().getClass(), "intField", new Integer(1).getClass());
    Assert.notNull(m);
}

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

@Category({ RegressionTests.class, SmokeTests.class })
@Test/*  w  ww.j  a  v a2  s .  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:com.ewcms.publication.deploy.provider.FtpDeployOperatorTest.java

@Test
public void testGetTargtRoot() throws Exception {
    String hostname = "14.136.146.36";
    String username = "itkaizen.com";
    String password = "kaizenidc";
    String path = "/wwwroot";

    DeployOperatorable operator = new FtpDeployOperator.Builder(hostname, path).setUsername(username)
            .setPassword(password).build();

    FtpDeployOperator ftpOperator = (FtpDeployOperator) operator;

    FileObject target = ftpOperator.getRootFileObject();
    Assert.notNull(target);
    target.close();/*from  w  w w  . j  a  v  a 2s . c  om*/
}

From source file:com.frank.search.solr.core.query.QueryParameterImpl.java

/**
 * @param name must not be null// ww w .  j  a va  2  s . com
 * @param value
 */
public QueryParameterImpl(String name, Object value) {
    super();
    Assert.notNull(name);

    this.name = name;
    this.value = value;
}