コード例 #1
0
        public void Failed_Result_Validation_Error()
        {
            var srv = new MyService();

            var addevennums = srv.AddTwoEvenNumbers(2, 5);

            Assert.IsFalse(addevennums.WasSuccessful);
            Assert.IsTrue(addevennums.Messages.Count == 1);
            Assert.IsTrue(addevennums.Messages[0].MessageType == FunctionResultMessageTypes.Validation);
            Assert.IsTrue(addevennums.Messages[0].FieldName == "Y");
        }