public void ShouldRequireMinimumFields() { var command = new GetLinkCommand(); FluentActions.Invoking(() => SendAsync(command)).Should().Throw <ValidationException>(); }
public async Task ShouldNotBeAbleToCallInvalidURL() { var command = new GetLinkCommand() { Text = "ahttps://www.tutorialspoint.com/index.htm", ScrapeType = ScrapeTypes.Link.Name }; FluentActions.Invoking(() => SendAsync(command)).Should().Throw <ValidationException>(); }
public async Task ShouldNotTakeOtherThanLinkOrText() { var command = new GetLinkCommand() { Text = "something", ScrapeType = "something" }; FluentActions.Invoking(() => SendAsync(command)).Should().Throw <Exception>(); }
public void ShouldRequireText() { var command = new GetLinkCommand() { Text = "", ScrapeType = ScrapeTypes.Text.Name }; FluentActions.Invoking(() => SendAsync(command)).Should().Throw <ValidationException>(); }