コード例 #1
0
        public void AddComplaint_ReturnErrorMessage_WhenEmptyTopic()
        {
            var c      = MakeStubClient();
            var CM     = new ComplaintManagement();
            var result = CM.AddComplaint(c, "", exmapleBody, exmapleFormOfCompensation);

            Assert.AreEqual("Topic and Body required", result);
        }
コード例 #2
0
        public void AddComplaint_ReturnErrorMessage_WhenNullClient()
        {
            Client c      = null;
            var    CM     = new ComplaintManagement();
            var    result = CM.AddComplaint(c, exampleTopic, exmapleBody, exmapleFormOfCompensation);

            Assert.AreEqual("Client required", result);
        }
コード例 #3
0
        public void AddComplaint_ReturnSuccessMessage_WhenCorrect()
        {
            var CM = new ComplaintManagement();
            var c  = MakeStubClient();

            var result = CM.AddComplaint(c, exampleTopic, exmapleBody, exmapleFormOfCompensation);

            StringAssert.Equals("Added Succesfully", result);
        }
コード例 #4
0
        public void AddComplaintObjects_ReturnTopic_WhenAdded()
        {
            var c         = MakeStubClient();
            var complaint = MakeStubComplaint();
            var CM        = new ComplaintManagement();

            var result = CM.AddComplaint(c, complaint);

            Assert.AreEqual(exampleTopic, CM.Complaints[0].Topic);
        }
コード例 #5
0
        public void AddComplaintObjects_ReturnSuccessMessage_WhenObjectIsCorrect()
        {
            var c         = MakeStubClient();
            var complaint = MakeStubComplaint();
            var CM        = new ComplaintManagement();

            var result = CM.AddComplaint(c, complaint);

            Assert.AreEqual("Added Succesfully", result);
        }