Skip to content
Snippets Groups Projects
Commit 5260196a authored by noapo's avatar noapo
Browse files

test à 100%

parent 223086cb
No related branches found
No related tags found
No related merge requests found
Pipeline #10500 passed
...@@ -59,19 +59,15 @@ public class SphereTest { ...@@ -59,19 +59,15 @@ public class SphereTest {
@Test @Test
public void testInContactWithTrue() throws Exception public void testInContactWith() throws Exception
{ {
Sphere s1 = new Sphere(1.5, new Point3d(1.0, 2.0, 3.0)); Sphere s1 = new Sphere(1.5, new Point3d(0, 0, 3.0));
Sphere autre = new Sphere(1.5, new Point3d(2.0, 3.0, 4.0)); Sphere s2 = new Sphere(1.5, new Point3d(2.0, 3.0, 0));
assertTrue(s1.inContactWith(autre)); Sphere s3 = new Sphere(4, new Point3d(0, 0, 3.0));
assertTrue(s3.inContactWith(s2));
assertTrue(s3.inContactWith(s1));
assertFalse(s2.inContactWith(s1));
} }
@Test
public void testInContactWithFalse() throws Exception
{
Sphere s1 = new Sphere(1.5, new Point3d(1.0, 2.0, 3.0));
Sphere autre = new Sphere(1, new Point3d(10.0, 50.0, 40.0));
assertFalse(s1.inContactWith(autre));
}
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment