public async Task ShouldRequireExisitingWebsite() { Website website = new Website { Name = "test", Url = "test.com", CategoryId = 1, ImagePath = "e:\\fake\\path\\image.jpg", Email = "*****@*****.**", Password = "******" }; await AddAsync(website); var query = new GetWebsiteQuery { WebsiteId = 10 }; FluentActions.Invoking(() => SendAsync(query)).Should().Throw <NotFoundException>(); }
public async Task ShouldReturnWebsite() { Website website = new Website { Name = "test", Url = "test.com", CategoryId = 1, ImagePath = "e:\\fake\\path\\image.jpg", Email = "*****@*****.**", Password = "******" }; await AddAsync(website); var query = new GetWebsiteQuery { WebsiteId = 1 }; var result = await SendAsync(query); result.Should().NotBeNull(); result.Name.Should().Be(website.Name); }