public async Task ReturnNull_When_WebSiteServiceReturnsNull() { webSiteServiceMock.Setup(service => service.All()).ReturnsAsync(() => null); var controller = new WebSiteController(webSiteServiceMock.Object); var sut = await controller.Get(); Assert.NotNull(sut.Result as NoContentResult); }
public WebSiteControllerTests() { this.webSiteService = new Mock <IWebSiteService>(); this.webSiteController = new WebSiteController(this.webSiteService.Object); }