Exemple #1
0
        public void CanCreate_should_throw_exception_if_text_not_defined()
        {
            var command = new CreateComment();

            ValidationAssert.Throws(() => GuardComments.CanCreate(command),
                                    new ValidationError("Text is required.", "Text"));
        }
Exemple #2
0
        public void CanCreate_should_not_throw_exception_if_text_defined()
        {
            var command = new CreateComment {
                Text = "text"
            };

            GuardComments.CanCreate(command);
        }