Exemplo n.º 1
0
        [TestCase(2.1, ExpectedResult = 2)] // Top of segment
        public double IntersectionPointY_Horizontal(double xPtN)
        {
            Point ptI = new Point(2, 2);
            Point ptJ = new Point(3, 2);

            return(ProjectionVertical.IntersectionPointY(xPtN, ptI, ptJ));
        }
Exemplo n.º 2
0
        [TestCase(3.5, ExpectedResult = 5)] // Top of segment
        public double IntersectionPointY_Sloped(double xPtN)
        {
            Point ptI = new Point(2, 2);
            Point ptJ = new Point(3, 4);

            return(ProjectionVertical.IntersectionPointY(xPtN, ptI, ptJ));
        }
Exemplo n.º 3
0
        public void IntersectionPointY_Vertical_Throws_Argument_Exception()
        {
            Point ptI = new Point(2, 2);
            Point ptJ = new Point(2, 4);

            Assert.That(() => ProjectionVertical.IntersectionPointY(2, ptI, ptJ),
                        Throws.Exception
                        .TypeOf <ArgumentException>());
        }