Пример #1
0
        public void AddCutRuleIsCorrectlyApplied()
        {
            CyrRule rule = new CyrRule("add2");
            string  a    = "text";
            string  b    = rule.Apply(a);

            Assert.Equal("teadd", b);
        }
Пример #2
0
        public void EmptyRuleIsCorrectlyApplied()
        {
            CyrRule rule = new CyrRule(string.Empty);
            string  a    = "text";
            string  b    = rule.Apply(a);

            Assert.Equal(a, b);
        }
Пример #3
0
        public void UnavailableRulelIsCorrectlyApplied()
        {
            CyrRule rule = new CyrRule("*");
            string  a    = "text";
            string  b    = rule.Apply(a);

            Assert.Equal(string.Empty, b);
        }
Пример #4
0
        public void CutRuleIsCorrectlyReverted()
        {
            CyrRule rule     = new CyrRule("2");
            string  original = "text";
            string  current  = "pe";
            string  reverted = rule.Revert(original, current);

            Assert.Equal("pext", reverted);
        }
Пример #5
0
        public void EmptyRuleIsCorrectlyReverted()
        {
            CyrRule rule     = new CyrRule(string.Empty);
            string  original = "text";
            string  current  = "pext";
            string  reverted = rule.Revert(original, current);

            Assert.Equal(current, reverted);
        }
Пример #6
0
        public void UnavailableRulelIsCorrectlyReverted()
        {
            CyrRule rule     = new CyrRule("*");
            string  original = "text";
            string  current  = "pext";
            string  reverted = rule.Revert(original, current);

            Assert.Equal(current, reverted);
        }