Пример #1
0
        public void InsertCommand_Valido()
        {
            var command = new GrupoInsertCommand("1234");

            command.Validate();
            var validacaoNome = command.Invalid;

            Assert.False(validacaoNome);
        }
Пример #2
0
        public void InsertCommand_Invalido()
        {
            var command = new GrupoInsertCommand("   ");

            command.Validate();
            var validacaoNomeCurto = command.Invalid;

            command = new GrupoInsertCommand("123456789012345678901234567890123456789012345678901");
            command.Validate();
            var validacaoNomeLongo = command.Invalid;

            Assert.True(validacaoNomeCurto);
            Assert.True(validacaoNomeLongo);
        }