Beispiel #1
0
        public void ShouldInvalidateCadastrarProjetoCommandWhenNameIsGreaterThan60()
        {
            var _cadastrarProjetoCommand = new CadastrarProjetoCommand("dhasghghghaghdgashdghgdhjghasgdjhagddhasghghghaghdgashdghgdhjghasgdjhagd", StatusDeCadastro.Normal);

            _cadastrarProjetoCommand.Validate();

            var result = _cadastrarProjetoCommand.Notifications.ToList();

            Assert.AreEqual(result[0].Message, "Nome não pode ser maior que 60 caracteres.");
        }
Beispiel #2
0
        public void ShouldInvalidateCadastrarProjetoCommandWhenNameIsLessThan3()
        {
            var _cadastrarProjetoCommand = new CadastrarProjetoCommand("as", StatusDeCadastro.Normal);

            _cadastrarProjetoCommand.Validate();

            var result = _cadastrarProjetoCommand.Notifications.ToList();

            Assert.AreEqual(result[0].Message, "Nome deve ter no mínimo 3 caracteres.");
        }
Beispiel #3
0
        public void ShouldInvalidateCadastrarProjetoCommandWhenNameIsEmpty()
        {
            var _cadastrarProjetoCommand = new CadastrarProjetoCommand("", StatusDeCadastro.Normal);

            _cadastrarProjetoCommand.Validate();

            var result = _cadastrarProjetoCommand.Notifications.ToList();

            Assert.AreEqual(result[0].Message, "Nome é obrigatório");
        }