示例#1
0
        //private User _currentUser;
        //private Mock<ISecurityContext> _securityContext;

        public ProductsQueryProcessorTest()
        {
            _random = new Random();
            _uow    = new Mock <IUnitOfWork>();

            _productList = new List <Product>();
            _uow.Setup(x => x.Query <Product>()).Returns(() => _productList.AsQueryable());

            _query = new ProductsQueryProcessor(_uow.Object);
        }
示例#2
0
 public ProductsController(IProductsQueryProcessor query, IMapper mapper)
 {
     _query  = query;
     _mapper = mapper;
 }