mirror of
https://github.com/RustyRaptor/Programs.git
synced 2026-12-03 15:45:21 -07:00
refactored Tests and added comments
This commit is contained in:
1 parent
a6a09826a6
commit
ca0daec681
2 files changed
+26
-4
No files matched your search
@@ -98,16 +98,27 @@ public class Circle1Test {
|
||||
}
|
||||
|
||||
//
|
||||
// Test scaling with a fractional value
|
||||
// Test intersect with a True result
|
||||
//
|
||||
@Test
|
||||
public void simpleIntersect() {
|
||||
System.out.println("Running test simpleScaleFrac.");
|
||||
System.out.println("Running test simpleIntersect.");
|
||||
Circle1 circleA = new Circle1(2, 1, 3);
|
||||
Circle1 circleB = new Circle1(10, 5, 8);
|
||||
Assert.assertTrue(circleA.intersects(circleB));
|
||||
}
|
||||
|
||||
//
|
||||
// Test Intersect with a false result
|
||||
//
|
||||
@Test
|
||||
public void simpleIntersectFalse() {
|
||||
System.out.println("Running test simpleIntersectFalse.");
|
||||
Circle1 circleA = new Circle1(1, 1, 2);
|
||||
Circle1 circleB = new Circle1(6, 7, 2);
|
||||
Assert.assertTrue(!circleA.intersects(circleB));
|
||||
}
|
||||
|
||||
public static void main(String args[]) {
|
||||
try {
|
||||
org.junit.runner.JUnitCore.runClasses(
|
||||
|
||||
@@ -98,16 +98,27 @@ public class Circle2Test {
|
||||
}
|
||||
|
||||
//
|
||||
// Test scaling with a fractional value
|
||||
// Test intersect with a True result
|
||||
//
|
||||
@Test
|
||||
public void simpleIntersect() {
|
||||
System.out.println("Running test simpleScaleFrac.");
|
||||
System.out.println("Running test simpleIntersect.");
|
||||
Circle2 circleA = new Circle2(2, 1, 3);
|
||||
Circle2 circleB = new Circle2(10, 5, 8);
|
||||
Assert.assertTrue(circleA.intersects(circleB));
|
||||
}
|
||||
|
||||
//
|
||||
// Test Intersect with a false result
|
||||
//
|
||||
@Test
|
||||
public void simpleIntersectFalse() {
|
||||
System.out.println("Running test simpleIntersectFalse.");
|
||||
Circle2 circleA = new Circle2(1, 1, 2);
|
||||
Circle2 circleB = new Circle2(6, 7, 2);
|
||||
Assert.assertTrue(!circleA.intersects(circleB));
|
||||
}
|
||||
|
||||
public static void main(String args[]) {
|
||||
try {
|
||||
org.junit.runner.JUnitCore.runClasses(
|
||||
|
||||
Reference in new issue
Block a user