public void ShouldThrowIfEmptyParameterPassed() { var values = new string[] { "val1", "" }; SetupVerifiableAxeInjectionCall(); var builder = new AxeBuilder(webDriverMock.Object); VerifyExceptionThrown <ArgumentException>(() => builder.WithRules(values)); VerifyExceptionThrown <ArgumentException>(() => builder.DisableRules(values)); VerifyExceptionThrown <ArgumentException>(() => builder.WithTags(values)); VerifyExceptionThrown <ArgumentException>(() => builder.Include(values)); VerifyExceptionThrown <ArgumentException>(() => builder.Exclude(values)); }
public void ShouldThrowIfNullParameterPassed() { SetupVerifiableAxeInjectionCall(); VerifyExceptionThrown <ArgumentNullException>(() => new AxeBuilder(webDriverMock.Object, null)); VerifyExceptionThrown <ArgumentNullException>(() => new AxeBuilder(null)); var builder = new AxeBuilder(webDriverMock.Object); VerifyExceptionThrown <ArgumentNullException>(() => builder.WithRules(null)); VerifyExceptionThrown <ArgumentNullException>(() => builder.DisableRules(null)); VerifyExceptionThrown <ArgumentNullException>(() => builder.WithTags(null)); VerifyExceptionThrown <ArgumentNullException>(() => builder.Include(null)); VerifyExceptionThrown <ArgumentNullException>(() => builder.Exclude(null)); VerifyExceptionThrown <ArgumentNullException>(() => builder.WithOptions(null)); }