Package org.kalimullin.fsraytracer.ray

Source Code of org.kalimullin.fsraytracer.ray.RayTest

package org.kalimullin.fsraytracer.ray;

import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.kalimullin.fsraytracer.geometry.Point;

public class RayTest extends Assert {

    @Rule
    public ExpectedException expectedException = ExpectedException.none();

    @Test
    public void testParsingString() {
        assertEquals(new Ray(new Point(-1,-5,-6), new Point(2,5,7), 17), Ray.getRayFromString("17;-1,-5,-6;2,5,7"));
    }

    @Test
    public void testParsingIllegalString() {
        expectedException.expect(IllegalArgumentException.class);
        Ray.getRayFromString("1,5,6");
    }


}
TOP

Related Classes of org.kalimullin.fsraytracer.ray.RayTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.