Beispiel #1
0
        public void InsertCategoryCommandShouldValidationFail()
        {
            var command = new InsertCategoryCommand(string.Empty);

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

            Assert.IsTrue(response.Failed);
        }
        public void InsertCategoryCommand_ShouldFail()
        {
            var command = new InsertCategoryCommand();

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

            Assert.IsTrue(response.Failed);
        }
Beispiel #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);
        }