public void QueryDispatcherShouldReturnObjectOfQueryHandler() { var resultObj = new Test(Guid.NewGuid()); DependencyServiceMock.SetMock(new DependencyDescriptor(typeof(IQueryHandler <TestQuery, Test>), QueryHandlerMock.GetMock(resultObj))); var dispatcher = new QueryDispatcher(PerformanceCounterMock.GetMock()); var result = dispatcher.Execute(new TestQuery()); result.Should().Equals(resultObj); }