コード例 #1
0
        public void TestLoationIsWithin()
        {
            var control = LocationControl.GetInstance();

            Assert.IsTrue(control.IsWithin("Aalborg", "Denmark"));
            Assert.IsTrue(control.IsWithin("Aalborg", "Aalborg"));
        }
コード例 #2
0
        public void TestAddDeleteLocation()
        {
            var control = LocationControl.GetInstance();

            control.RegisterLocation("Unit Test City", LocationType.City);
            control.DeleteLocation("Unit Test City");
        }
コード例 #3
0
        public void TestNestedLocations()
        {
            var control = LocationControl.GetInstance();

            control.RegisterLocation("Unit Test Country", LocationType.Country);
            control.RegisterLocation("Unit Test City 1", LocationType.City, "Unit Test Country");
            control.RegisterLocation("Unit Test City 2", LocationType.City, "Unit Test Country");

            control.DeleteLocation("Unit Test City 1");
            control.DeleteLocation("Unit Test City 2");
            control.DeleteLocation("Unit Test Country");
        }
コード例 #4
0
        public void TestLoationIsNotWithin()
        {
            var control = LocationControl.GetInstance();

            Assert.IsFalse(control.IsWithin("Germany", "Poland"));
        }