コード例 #1
0
        public void ContraryCountryGetawaysMatcher_IsMatch_Name()
        {
            var matcher = new ContraryCountryGetawaysMatcher();

            var supplierHotel = new SupplierHotel()
                {
                    Name = "Manor Country Mayhew’s Ralph Lord"
                };
            var hotel = new Hotel()
                {
                    Name = "Lord Ralph Mayhew’s Country Manor"
                };

            var isMatch = matcher.IsMatch(supplierHotel, hotel);

            Assert.AreEqual(true, isMatch);
        }
コード例 #2
0
        public void TestGetMatcherByName()
        {
            var actual = GenericMatcherUtils.GetMatcherByName("ContraryCountryGetawaysMatcher");
            var expected = new ContraryCountryGetawaysMatcher();

            Assert.AreEqual(expected.GetType().FullName, actual.GetType().FullName);

            var actual2 = GenericMatcherUtils.GetMatcherByName("SuperfluousHotelMatcher");
            var expected2 = new SuperfluousHotelMatcher();

            Assert.AreEqual(expected2.GetType().FullName, actual2.GetType().FullName);

            var actual3 = GenericMatcherUtils.GetMatcherByName("ThereaboutsHolidaysMatcher");
            var expected3 = new ThereaboutsHolidaysMatcher();

            Assert.AreEqual(expected3.GetType().FullName, actual3.GetType().FullName);
        }