public async void ByDataVersion_Not_Exists() { var mock = new ServiceMockFacade <IChannelRepository>(); mock.RepositoryMock.Setup(x => x.ByDataVersion(It.IsAny <byte[]>())).Returns(Task.FromResult <List <Channel> >(new List <Channel>())); var service = new ChannelService(mock.LoggerMock.Object, mock.RepositoryMock.Object, mock.ModelValidatorMockFactory.ChannelModelValidatorMock.Object, mock.BOLMapperMockFactory.BOLChannelMapperMock, mock.DALMapperMockFactory.DALChannelMapperMock); List <ApiChannelResponseModel> response = await service.ByDataVersion(default(byte[])); response.Should().BeEmpty(); mock.RepositoryMock.Verify(x => x.ByDataVersion(It.IsAny <byte[]>())); }