Ejemplo n.º 1
0
        public void GetLookup_Empty()
        {
            var input    = " This IS a *difficult* identifier to_match! ";
            var expected = "";
            var matching = new AggressiveNameMatchingStrategy();

            Assert.AreNotEqual(matching.GetLookup(expected), matching.GetLookup(input));
            Assert.AreNotEqual(matching.GetLookup(expected.ToUpper()), matching.GetLookup(input));
        }
        public void IsMatch_Positive_Complex()
        {
            var input    = " This IS a *difficult* identifier to_match! ";
            var property = typeof(AggressiveNameMatchingStrategyTest).GetProperty("THS_is_a_dificult_identiffier_to_mtch");
            var matching = new AggressiveNameMatchingStrategy();

            Assert.IsTrue(matching.IsMatch(property, input));
            Assert.IsTrue(matching.IsMatch(property, input.ToUpper()));
        }
        public void GetLookup_Positive_Complex()
        {
            var input    = " This IS a *difficult* identifier to_match! ";
            var expected = "THS_is_a_dificult_identiffier_to_mtch";
            var matching = new AggressiveNameMatchingStrategy();

            Assert.AreEqual(matching.GetLookup(expected), matching.GetLookup(input));
            Assert.AreEqual(matching.GetLookup(expected.ToUpper()), matching.GetLookup(input));
        }
        public void IsMatch_Positive()
        {
            var input    = " This ES a *diffocult* identifier to_match! ";
            var property = typeof(AggressiveNameMatchingStrategyTest).GetProperty("thisisadifficultidentifiertomatch");
            var matching = new AggressiveNameMatchingStrategy();

            Assert.IsTrue(matching.IsMatch(property, input));
            Assert.IsTrue(matching.IsMatch(property, input.ToUpper()));
        }