public async void ByProjectId_Not_Exists() { var mock = new ServiceMockFacade <IChannelRepository>(); mock.RepositoryMock.Setup(x => x.ByProjectId(It.IsAny <string>())).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.ByProjectId(default(string)); response.Should().BeEmpty(); mock.RepositoryMock.Verify(x => x.ByProjectId(It.IsAny <string>())); }