public void add_rule_raiz_2x_fica_rules_count_igual_a_1()
 {
     var c = new Contracts();
     c.AddRule("/", new RootHandler());
     c.AddRule("/", new RootHandler());
     Assert.AreEqual(c.Testes_GetRulesCount(), 1);
 }
示例#2
0
        public void add_rule_raiz_espaco_fica_rules_count_igual_a_1()
        {
            var c = new Contracts();

            c.AddRule("/ ", new RootHandler());
            Assert.AreEqual(c.Testes_GetRulesCount(), 1);
        }
示例#3
0
        public void add_rule_vazia_fica_rules_count_igual_a_0()
        {
            var c = new Contracts();

            c.AddRule("", new RootHandler());
            Assert.AreEqual(c.Testes_GetRulesCount(), 0);
        }
 public void add_rules_varias_especiais_fica_rules_count_igual_a_5()
 {
     var c = new Contracts();
     c.AddRule("", new RootHandler()); // regra vazia sera ignorada
     c.AddRule(" ", new RootHandler()); // regras nao vazias serao adicionadas
     c.AddRule("/", new RootHandler());
     c.AddRule("/ ", new RootHandler());
     c.AddRule(" / ", new RootHandler());
     c.AddRule(" a ", new RootHandler());
     c.AddRule("", new RootHandler()); // regra vazia sera ignorada
     c.AddRule(" ", new RootHandler()); // regras duplicadas serao ignoradas
     c.AddRule("/", new RootHandler());
     c.AddRule("/ ", new RootHandler());
     c.AddRule(" / ", new RootHandler());
     c.AddRule(" a ", new RootHandler());
     Assert.AreEqual(c.Testes_GetRulesCount(), 5);
 }
示例#5
0
        public void add_rules_varias_especiais_fica_rules_count_igual_a_5()
        {
            var c = new Contracts();

            c.AddRule("", new RootHandler());  // regra vazia sera ignorada
            c.AddRule(" ", new RootHandler()); // regras nao vazias serao adicionadas
            c.AddRule("/", new RootHandler());
            c.AddRule("/ ", new RootHandler());
            c.AddRule(" / ", new RootHandler());
            c.AddRule(" a ", new RootHandler());
            c.AddRule("", new RootHandler());  // regra vazia sera ignorada
            c.AddRule(" ", new RootHandler()); // regras duplicadas serao ignoradas
            c.AddRule("/", new RootHandler());
            c.AddRule("/ ", new RootHandler());
            c.AddRule(" / ", new RootHandler());
            c.AddRule(" a ", new RootHandler());
            Assert.AreEqual(c.Testes_GetRulesCount(), 5);
        }
 public void add_rule_vazia_fica_rules_count_igual_a_0()
 {
     var c = new Contracts();
     c.AddRule("", new RootHandler());
     Assert.AreEqual(c.Testes_GetRulesCount(), 0);
 }