예제 #1
0
        public void CategoryByIdQuery()
        {
            var query = new CategoryByIdQuery(1);

            var response = _mediator.HandleAsync <CategoryByIdQuery, Category>(query).Result;

            Assert.IsTrue(response.Succeeded && response.Data != default);
        }
예제 #2
0
        public void CategoryByIdQuery()
        {
            var query = new CategoryByIdQuery {
                Id = 1L
            };

            var response = _mediator.HandleAsync <CategoryByIdQuery, Category>(query).Result;

            Assert.IsTrue(response.Succeeded);
            Assert.IsNotNull(response.Data);
        }