예제 #1
0
        public IEnumerable <EmployeeTO> GetEmployeeHierarchy()
        {
            var result = QueryDispatcher
                         .Query <GetEmployeeHierarchyQuery, GetEmployeeHierarchyQueryOutput>(new GetEmployeeHierarchyQuery())
                         .RootEmployees;

            return(result);
        }
예제 #2
0
        public async Task MustGetQueryHandlerFromStronglyTypedQuery()
        {
            await _sut.Query(_query);

            _serviceProvider.Verify(p => p.GetService(typeof(IQueryHandler <TestQuery, string>)), Times.Once);
        }
예제 #3
0
        public async Task MustGetQueryHandlerFromGenericQuery()
        {
            await _sut.Query <IQuery <string>, string>(It.IsAny <IQuery <string> >());

            _serviceProvider.Verify(p => p.GetService(typeof(IQueryHandler <IQuery <string>, string>)), Times.Once);
        }