public void TestCantBeRepeatedRule()
        {
            CantBeRepeated rule = new CantBeRepeated();

            Assert.False(rule.Execute("MMDD"));
            Assert.False(rule.Execute("XVIV"));
            Assert.True(rule.Execute("XXIV"));
        }
Esempio n. 2
0
        //"D", "L", and "V" can never be repeated.
        public void CantBeRepeatedRuleTest()
        {
            CantBeRepeated rule = new CantBeRepeated();

            Assert.False(rule.ExecuteCheck("MDDCI"));
            Assert.False(rule.ExecuteCheck("MLLLDC"));
            Assert.False(rule.ExecuteCheck("MVVVCI"));
            Assert.True(rule.ExecuteCheck("MMDC"));
            Assert.True(rule.ExecuteCheck("MDCC"));
        }