public IEnumerable <EmployeeTO> GetEmployeeHierarchy() { var result = QueryDispatcher .Query <GetEmployeeHierarchyQuery, GetEmployeeHierarchyQueryOutput>(new GetEmployeeHierarchyQuery()) .RootEmployees; return(result); }
public async Task MustGetQueryHandlerFromStronglyTypedQuery() { await _sut.Query(_query); _serviceProvider.Verify(p => p.GetService(typeof(IQueryHandler <TestQuery, string>)), Times.Once); }
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); }