示例#1
0
        //[Fact]
        //public async Task SendProduct()
        //{
        //    var command = new ProductCommand();
        //    var product = await this._mediator.Send<Product.Product>(command);
        //    this.WriteLine(product);
        //}

        //[Fact]
        public async Task SendFindCommand()
        {
            var command = new Command.Delete <Order>
            {
                Id = Guid.NewGuid().ToString("N")
            };
            var result = await this._mediator.SendAsync <bool>(command);

            Xunit.Assert.True(result);
        }
示例#2
0
 public Task <bool> HandleAsync(Command.Delete <Order> command)
 {
     Console.WriteLine(command.Id);
     return(Task.FromResult(true));
 }