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

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

            Assert.IsTrue(response.Failed);
        }
예제 #2
0
        public void InsertCategoryCommand_ShouldFail()
        {
            var command = new InsertCategoryCommand();

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

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