public void MsgTypeWithNoErrorThatHasNotExplanationInNoteIsValid()
        {
            var alert = new Alert();
            alert.MessageType = MessageType.Cancel;
            alert.Note = null;

            var msgTypeRejectionValidator = new MessageTypeRejectionValidator(alert);
            Assert.True(msgTypeRejectionValidator.IsValid);
        }
        public void MsgTypeWithErrorThatHasExplanationInNoteIsValid()
        {
            var alert = new Alert();
            alert.MessageType = MessageType.Error;
            alert.Note = "DescriptiveError";

            var msgTypeRejectionValidator = new MessageTypeRejectionValidator(alert);
            Assert.True(msgTypeRejectionValidator.IsValid);
        }
        public void MsgTypeWithErrorThatHasExplanationInNoteNullIsInvalid()
        {
            var alert = new Alert();
            alert.MessageType = MessageType.Error;
            alert.Note = null;

            var msgTypeRejectionValidator = new MessageTypeRejectionValidator(alert);
            Assert.False(msgTypeRejectionValidator.IsValid);
            Assert.Equal(typeof(MessageTypeRejectionError), msgTypeRejectionValidator.Errors.ElementAt(0).GetType());
        }
        public void MsgTypeWithNoErrorThatHasNotExplanationInNoteIsValid()
        {
            var alert = new Alert();

            alert.MessageType = MessageType.Cancel;
            alert.Note        = null;

            var msgTypeRejectionValidator = new MessageTypeRejectionValidator(alert);

            Assert.True(msgTypeRejectionValidator.IsValid);
        }
        public void MsgTypeWithErrorThatHasExplanationInNoteIsValid()
        {
            var alert = new Alert();

            alert.MessageType = MessageType.Error;
            alert.Note        = "DescriptiveError";

            var msgTypeRejectionValidator = new MessageTypeRejectionValidator(alert);

            Assert.True(msgTypeRejectionValidator.IsValid);
        }
        public void MsgTypeWithErrorThatHasExplanationInNoteNullIsInvalid()
        {
            var alert = new Alert();

            alert.MessageType = MessageType.Error;
            alert.Note        = null;

            var msgTypeRejectionValidator = new MessageTypeRejectionValidator(alert);

            Assert.False(msgTypeRejectionValidator.IsValid);
            Assert.Equal(typeof(MessageTypeRejectionError), msgTypeRejectionValidator.Errors.ElementAt(0).GetType());
        }