Package org.landal.mvcsample.domain

Source Code of org.landal.mvcsample.domain.ProductTest

package org.landal.mvcsample.domain;

import org.landal.mvcsample.domain.Product;

import junit.framework.TestCase;

public class ProductTest extends TestCase{

  private Product product;

  protected void setUp() throws Exception {
    product = new Product();
  }

  public void testSetAndGetDescription() {
    String testDescription = "aDescription";
    assertNull(product.getDescription());
    product.setDescription(testDescription);
    assertEquals(testDescription, product.getDescription());
  }

  public void testSetAndGetPrice() {
    double testPrice = 100.00;
    assertEquals(0, 0, 0);
    product.setPrice(testPrice);
    assertEquals(testPrice, product.getPrice(), 0);
  }

}
TOP

Related Classes of org.landal.mvcsample.domain.ProductTest

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.