@Test(expected = NullArgumentException.class) public void testNullReferencesArgument() throws NullArgumentException, InvalidArgumentException { Semiline xline3 = new Semiline(new Point(-1.0, 2.0), new Point(3.0, 2.0)); trimmer.trim(xline3, null, new Point(0.0, 0.0)); }
@Test public void semilineTrimsInfinitePart() throws NullArgumentException, InvalidArgumentException { Semiline horizontalLine = new Semiline(new Point(-1.0, 2.0), new Point(3.0, 2.0)); Collection<Element> collection = trimmer.trim(horizontalLine, cutPoints, new Point(69.0, 2.0)); assertCollectionContains(collection, new Line(new Point(-1.0, 2.0), new Point(50.0, 2.0))); Assert.assertEquals( "A trim between references should produce exactly 1 Line.", 1, collection.size()); }
@Test(expected = NullArgumentException.class) public void testNullLineArgument() throws NullArgumentException { trimmer.trim(null, cutPoints, new Point(0.0, 0.0)); }