Package com.warrantchange.service.impl

Source Code of com.warrantchange.service.impl.WarrantLocalServiceImplTest

package com.warrantchange.service.impl;

import com.liferay.portal.service.persistence.BasePersistenceTestCase;
import com.warrantchange.model.Warrant;
import com.warrantchange.service.WarrantLocalServiceUtil;

public class WarrantLocalServiceImplTest extends BasePersistenceTestCase {

  public void testAddWarrant() throws Exception {
    long userId = 1L;
    String summary = "MySummary";
    int quantity = 33;
    long price = 499;
   
    Warrant result = WarrantLocalServiceUtil.addWarrant(userId , summary, quantity, price);
   
    assertNotNull(result);
    assertNotNull(result.getId());
    assertEquals(userId, result.getId());
    assertEquals(summary, result.getSummary());
    assertEquals(quantity, result.getQuantity());
    assertEquals(price, result.getPrice());
    assertNotNull(result.getCreateDate());
    assertNotNull(result.getModifiedDate());
    assertEquals(result.getCreateDate(), result.getModifiedDate());
  }
}
TOP

Related Classes of com.warrantchange.service.impl.WarrantLocalServiceImplTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.