public async Task GetCountAsync_ShouldCallQueryService_AndReturnResult() { // Arrange const long count = 38; _mockQueryService .Setup(i => i.GetCountAsync()) .ReturnsAsync(count); var subject = new ComposedAsyncRepository <FakeEntity <int>, int>(_mockQueryService.Object, _mockCommandService.Object); // Act var result = await subject.GetCountAsync().ConfigureAwait(false); // Assert result.Should().Be(count); _mockQueryService.VerifyAll(); _mockCommandService.VerifyAll(); }