public void TestCalculateBreakpointStep4()
        {
            var breakpointCalculationService = new BreakpointCalculationService();
            var result = breakpointCalculationService.CalculateBreakpoint(new Point(110, 150), new Point(170, 140), 120);

            Assert.IsNotNull(result);
        }
        public void TestCalculateBreakpointRightLeft()
        {
            var breakpointCalculationService = new BreakpointCalculationService();
            var result = breakpointCalculationService.CalculateBreakpoint(new Point(130, 160), new Point(170, 140), 120);

            Assert.IsNotNull(result);
        }
        public void TestCalculateBreakpoint()
        {
            var breakpointCalculationService = new BreakpointCalculationService();
            var result = breakpointCalculationService.CalculateBreakpoint(new Point(4, 6), new Point(6, 4), 4);

            Assert.IsNotNull(result);
            Assert.AreEqual(new Point(6, 4), result);
        }
        public void TestCalculateBreakpointLeftOnSweepline()
        {
            var breakpointCalculationService = new BreakpointCalculationService();
            var result = breakpointCalculationService.CalculateBreakpoint(new Point(15, 120), new Point(20, 12), 120);

            Assert.IsNotNull(result);
            Assert.AreEqual(15, result.X);
            Assert.AreEqual(120, result.Y);
        }
        public void TestCalculateBreakpointSameY()
        {
            var breakpointCalculationService = new BreakpointCalculationService();
            var result = breakpointCalculationService.CalculateBreakpoint(new Point(15, 120), new Point(20, 120), 40);

            Assert.IsNotNull(result);
            Assert.AreEqual(18, result.XInt);
            Assert.AreEqual(40, result.YInt);
        }
        public void TestCalculateBreakpointStep5()
        {
            var breakpointCalculationService = new BreakpointCalculationService();
            var result = breakpointCalculationService.CalculateBreakpoint(new Point(2, 10), new Point(20, 12), 5);

            Assert.IsNotNull(result);
            Assert.AreEqual(11, result.XInt);
            Assert.AreEqual(5, result.YInt);
        }
Exemple #7
0
 public Leaf(Point site)
 {
     Site    = site;
     _logger = Logger.Instance;
     _breakpointCalculationService = new BreakpointCalculationService();
 }
Exemple #8
0
 public Node(Node parent)
 {
     Parent = parent;
     _breakpointCalculationService = new BreakpointCalculationService();
     _logger = Logger.Instance;
 }