Exemplo n.º 1
0
 public void ApproverService_RejectRule_CorrectRejectedRules()
 {
     dataHandler.AddConversationalRule(cRule1);
     dataHandler.AddFixedConversationalRule(cFRule1);
     controller.ApproverService.RejectRule(cRule1.Id);
     controller.ApproverService.RejectRule(cFRule1.Id);
     testCRule  = dataHandler.FindConversationalRuleById(cRule1.Id);
     testFCRule = dataHandler.FindFixedConversationalRuleById(cFRule1.Id);
     Assert.AreEqual <Status>(Status.Rejected, testCRule.Status);
     Assert.AreEqual <Status>(Status.Rejected, testFCRule.Status);
 }
Exemplo n.º 2
0
        public void EditorService_EditPendingRule_PendingRuleSuccessEdited()
        {
            dataHandler.AddConversationalRule(cRule1);
            dataHandler.AddFixedConversationalRule(cFRule1);
            string correctInput  = "changedInput";
            string correctOutput = "changedOutput";

            controller.EditorService.EditPendingRule(frank.Id, cRule1.Id, correctInput, correctOutput, controller.FixedConversationalRulesList, controller.ConversationalRulesList);
            controller.EditorService.EditPendingRule(frank.Id, cFRule1.Id, correctInput, correctOutput, controller.FixedConversationalRulesList, controller.ConversationalRulesList);
            testCRule  = dataHandler.FindConversationalRuleById("c1");
            testFCRule = dataHandler.FindFixedConversationalRuleById("fc1");
            Assert.AreEqual(correctInput, testCRule.Input);
            Assert.AreEqual(correctInput, testFCRule.Input);
            Assert.AreEqual(correctOutput, testCRule.Output);
            Assert.AreEqual(correctOutput, testFCRule.Output);
        }
Exemplo n.º 3
0
 public void EditorService_AddNewCRule_CRuleListHaveCorrectRules()
 {
     controller.EditorService.AddNewCRule(cRule1.Input, cRule1.Output, cRule1.RelatedUsersId);
     testCRule = dataHandler.FindConversationalRuleById(cRule1.Id);
     Assert.IsTrue(CompareTwoRules(cRule1, testCRule));
 }