summaryrefslogtreecommitdiff
path: root/src/Q7/PersonTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/Q7/PersonTest.java')
-rw-r--r--src/Q7/PersonTest.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/Q7/PersonTest.java b/src/Q7/PersonTest.java
new file mode 100644
index 0000000..1d79c9d
--- /dev/null
+++ b/src/Q7/PersonTest.java
@@ -0,0 +1,29 @@
+package ca.mokhan.test;
+
+import Q7.*;
+import java.io.*;
+import java.text.*;
+import java.util.*;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class PersonTest extends TestCase {
+ private Person subject;
+
+ public PersonTest(String testName) {
+ super(testName);
+ this.subject = new Person("mo", 1, 1);
+ }
+
+ public static Test suite() {
+ return new TestSuite(PersonTest.class);
+ }
+
+ public void test_getBMI_underweight() {
+ this.subject.setHeight(72);
+ this.subject.setWeight(100);
+
+ assertEquals("Underweight", this.subject.getCategory());
+ }
+}