Exemplo n.º 1
0
        public void InsertCategoryCommandShouldValidationFail()
        {
            var command = new InsertCategoryCommand(string.Empty);

            var response = _mediator.HandleAsync <InsertCategoryCommand, long>(command).Result;

            Assert.IsTrue(response.Failed);
        }
Exemplo n.º 2
0
        public void InsertCategoryCommand_ShouldFail()
        {
            var command = new InsertCategoryCommand();

            var response = _mediator.HandleAsync <InsertCategoryCommand, long>(command).Result;

            Assert.IsTrue(response.Failed);
        }
Exemplo n.º 3
0
        public void InsertCategoryCommand()
        {
            var command = new InsertCategoryCommand("Name");

            var response = _mediator.HandleAsync <InsertCategoryCommand, long>(command).Result;

            Assert.IsTrue(response.Succeeded && response.Data > 0);
        }