package mf;
/*Generated by MPS */
import junit.framework.TestCase;
import junit.framework.Assert;
import junit.textui.TestRunner;
import junit.framework.TestSuite;
public class QuantityTester extends TestCase {
private Unit myCm = new Unit("cm");
private Quantity myCm100 = new Quantity(100, myCm);
private Quantity myCm150 = new Quantity(150, myCm);
private Quantity myCm50 = new Quantity(50, myCm);
public QuantityTester(String name) {
super(name);
}
public void testAdd() {
Assert.assertEquals(myCm150, myCm100.add(myCm50));
}
public void testdivide() {
Assert.assertEquals(myCm50, myCm150.divide(3));
}
public void testmultiply() {
Assert.assertEquals(new Quantity(550, myCm), myCm100.multiply(5.5));
}
public void testsubtract() {
Assert.assertEquals(myCm50, myCm100.subtract(myCm50));
}
public static void main(String[] args) {
TestRunner.runAndWait(new TestSuite(QuantityTester.class));
}
}