You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
waf/playground/javatest/test/TestNums.java

32 lines
673 B
Java

import org.testng.Assert;
import org.testng.annotations.Test;
public class TestNums {
Nums myNumObj = new Nums();
@Test
public void testTrue() {
myNumObj.setValue(10);
boolean isBigger = myNumObj.isBiggerThanFive();
Assert.assertEquals(true, isBigger, "10 should be bigger than 5");
}
@Test
public void testFalse() {
myNumObj.setValue(1);
boolean isBigger = myNumObj.isBiggerThanFive();
Assert.assertEquals(false, isBigger, "1 should be smaller than 5");
}
@Test
public void testBoundary() {
myNumObj.setValue(5);
boolean isBigger = myNumObj.isBiggerThanFive();
Assert.assertEquals(false, isBigger, "5 should not be bigger than 5");
}
}