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); }
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); }
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); }