public async void Get_null_record() { var mock = new ServiceMockFacade <ITagSetRepository>(); mock.RepositoryMock.Setup(x => x.Get(It.IsAny <string>())).Returns(Task.FromResult <TagSet>(null)); var service = new TagSetService(mock.LoggerMock.Object, mock.RepositoryMock.Object, mock.ModelValidatorMockFactory.TagSetModelValidatorMock.Object, mock.BOLMapperMockFactory.BOLTagSetMapperMock, mock.DALMapperMockFactory.DALTagSetMapperMock); ApiTagSetResponseModel response = await service.Get(default(string)); response.Should().BeNull(); mock.RepositoryMock.Verify(x => x.Get(It.IsAny <string>())); }
public async void TestGet() { ApiTagSetResponseModel response = await this.Client.TagSetGetAsync("A"); response.Should().NotBeNull(); }