Ejemplo n.º 1
0
        public void ShouldRequireMinimumFields()
        {
            var command = new GetBodyCommand();

            FluentActions.Invoking(() =>
                                   SendAsync(command)).Should().Throw <ValidationException>();
        }
Ejemplo n.º 2
0
        public async Task ShouldNotBeAbleToCallInvalidURL()
        {
            var command = new GetBodyCommand()
            {
                Text = "ahttps://www.tutorialspoint.com/index.htm", ScrapeType = ScrapeTypes.Link.Name
            };

            FluentActions.Invoking(() =>
                                   SendAsync(command)).Should().Throw <ValidationException>();
        }
Ejemplo n.º 3
0
        public async Task ShouldNotTakeOtherThanLinkOrText()
        {
            var command = new GetBodyCommand()
            {
                Text = "something", ScrapeType = "something"
            };

            FluentActions.Invoking(() =>
                                   SendAsync(command)).Should().Throw <Exception>();
        }
Ejemplo n.º 4
0
        public void ShouldRequireText()
        {
            var command = new GetBodyCommand()
            {
                Text = "", ScrapeType = ScrapeTypes.Text.Name
            };

            FluentActions.Invoking(() =>
                                   SendAsync(command)).Should().Throw <ValidationException>();
        }