Ejemplo n.º 1
0
        public void MinMaxTest()
        {
            MySQLClass MyDB = new MySQLClass("DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=senseless;UID=root;PASSWORD=admin;OPTION=3;");

            Node BlindNode = new Node("Test", MyDB);

            BlindNode.NewAnchor("1", 50.00, 0.00, 0.00, 1);
            BlindNode.NewAnchor("2", 50.00, 15.00, 0.00, 1);
            BlindNode.NewAnchor("3", 50.00, 15.00, 22.00, 1);
            BlindNode.NewAnchor("4", 50.00, 15.00, 15.00, 2);

            //BlindNode.NewAnchor("1", 50.00, 100, 100);

            Point expected = new Point(1, 1);

            Node.FilterMethod filterMethod = RangeBasedPositioning.AverageFilter;

            Point actual;

            actual = MinMax.CalculatePosition(BlindNode, filterMethod, true);
            Assert.AreEqual(expected.x, actual.x);
            Assert.AreEqual(expected.y, actual.y);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }