Пример #1
0
        public async void NaoDeveIncluir(Guid id, string nome, GeneroDisco genero, decimal valor)
        {
            var command = new InsertDiscoCommand(id, nome, genero, valor);
            var handler = new InsertDiscoHandler(_uow, _repository);
            var result  = await handler.Handle(command, CancellationToken.None);

            Assert.False(result.IsValid);
        }
Пример #2
0
        public void InserirDadosInvalidos(Guid id, string nome, GeneroDisco genero, decimal valor)
        {
            var command   = new InsertDiscoCommand(id, nome, genero, valor);
            var validator = new InsertDiscoValidator();
            var result    = validator.Validate(command);

            Assert.False(result.IsValid);
        }