public async Task QueryAsync_WhenCalled_AssertGetLetterHeadsAsyncWasCalledOnCommonRepository()
        {
            QueryHandler sut = CreateSut();

            await sut.QueryAsync(new EmptyQuery());

            _commonRepositoryMock.Verify(m => m.GetLetterHeadsAsync(), Times.Once);
        }
        public async Task QueryAsync_WhenCalled_ReturnsLetterHeadCollectionFromCommonRepository()
        {
            IEnumerable <ILetterHead> letterHeadCollection = _fixture.CreateMany <ILetterHead>(_random.Next(5, 10)).ToList();
            QueryHandler sut = CreateSut(letterHeadCollection);

            IEnumerable <ILetterHead> result = await sut.QueryAsync(new EmptyQuery());

            Assert.That(result, Is.EqualTo(letterHeadCollection));
        }
        public void QueryAsync_WhenQueryIsNull_ThrowsArgumentNullException()
        {
            QueryHandler sut = CreateSut();

            ArgumentNullException result = Assert.ThrowsAsync <ArgumentNullException>(async() => await sut.QueryAsync(null));

            Assert.That(result.ParamName, Is.EqualTo("query"));
        }