Ejemplo n.º 1
0
        public IEnumerable <EmployeeTO> GetEmployeeHierarchy()
        {
            var result = QueryDispatcher
                         .Query <GetEmployeeHierarchyQuery, GetEmployeeHierarchyQueryOutput>(new GetEmployeeHierarchyQuery())
                         .RootEmployees;

            return(result);
        }
Ejemplo n.º 2
0
        public async Task MustGetQueryHandlerFromStronglyTypedQuery()
        {
            await _sut.Query(_query);

            _serviceProvider.Verify(p => p.GetService(typeof(IQueryHandler <TestQuery, string>)), Times.Once);
        }
Ejemplo n.º 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);
        }