public void MatchesLocationReturnsTrueWhenBothLocationLacksForwardSlashTest() { var expectedLocation = new Uri("http://www.test.com/some/time"); var target = new RelaxedFolderLocationValidator(); var actualLocation = new Uri("http://www.test.com/some/time?stuff=true"); var actual = target.Matches(actualLocation, expectedLocation); actual.Should().BeTrue(); }
public void MatchesLocationReturnsFalseWhenMatchingExpectedLocationFolderAgainstActualLocationFileTest() { var expectedLocation = new Uri("http://www.test.com/some/time/"); var target = new RelaxedFolderLocationValidator(); var actualLocation = new Uri("http://www.test.com/some/time/test.txt"); var actual = target.Matches(actualLocation, expectedLocation); actual.Should().BeFalse(); }
public void MatchesLocationThrowsExceptionWithNullActualLocationTest() { var actualLocation = new Uri("http://www.test.com/some/time"); var target = new RelaxedFolderLocationValidator(); Action action = () => target.Matches(actualLocation, (Uri)null); action.ShouldThrow <ArgumentNullException>(); }
public void MatchesLocationThrowsExceptionWithNullExpectedLocationTest() { var expectedLocation = new Uri("http://www.test.com/some/Time"); var target = new RelaxedFolderLocationValidator(); Action action = () => target.Matches(null, expectedLocation); action.ShouldThrow <ArgumentNullException>(); }
public void MatchesLocationReturnsTrueWithCaseInsensitiveHostMatchingTest() { var expectedLocation = new Uri("http://www.TEST.com/some/time/"); var target = new RelaxedFolderLocationValidator(); var actualLocation = new Uri("http://www.test.com/some/time/?stuff=true"); var actual = target.Matches(actualLocation, expectedLocation); actual.Should().BeTrue(); }
public void MatchesExpressionsThrowsExceptionTest() { var actualLocation = new Uri("http://www.test.com/some/time/"); var target = new RelaxedFolderLocationValidator(); Action action = () => target.Matches(actualLocation, new List <Regex>()); action.ShouldThrow <NotImplementedException>(); }
public void MatchesExpressionsThrowsExceptionTest() { var actualLocation = new Uri("http://www.test.com/some/time/"); var target = new RelaxedFolderLocationValidator(); Action action = () => target.Matches(actualLocation, new List<Regex>()); action.ShouldThrow<NotImplementedException>(); }
public void MatchesLocationReturnsTrueWhenIgnoringQueryStringTest() { var expectedLocation = new Uri("http://www.test.com/some/time/"); var target = new RelaxedFolderLocationValidator(); var actualLocation = new Uri("http://www.test.com/some/time/?stuff=true"); var actual = target.Matches(actualLocation, expectedLocation); actual.Should().BeTrue(); }
public void MatchesLocationReturnsFalseWhenMatchingExpectedLocationFolderAgainstActualLocationFileTest() { var expectedLocation = new Uri("http://www.test.com/some/time/"); var target = new RelaxedFolderLocationValidator(); var actualLocation = new Uri("http://www.test.com/some/time/test.txt"); var actual = target.Matches(actualLocation, expectedLocation); actual.Should().BeFalse(); }
public void MatchesLocationThrowsExceptionWithRelativeExpectedLocationTest() { var actualLocation = new Uri("http://www.test.com/some/time"); var expectedLocation = new Uri("/some/Time", UriKind.Relative); var target = new RelaxedFolderLocationValidator(); Action action = () => target.Matches(actualLocation, expectedLocation); action.ShouldThrow <ArgumentException>(); }
public void MatchesLocationReturnsTrueWhenBothLocationLacksForwardSlashTest() { var expectedLocation = new Uri("http://www.test.com/some/time"); var target = new RelaxedFolderLocationValidator(); var actualLocation = new Uri("http://www.test.com/some/time?stuff=true"); var actual = target.Matches(actualLocation, expectedLocation); actual.Should().BeTrue(); }
public void ValidationTypeIdentifiesUriOnlyTest() { var target = new RelaxedFolderLocationValidator(); target.ValidationType.Should().Be(LocationValidationType.UriOnly); }
public void MatchesLocationReturnsTrueWhenIgnoringQueryStringTest() { var expectedLocation = new Uri("http://www.test.com/some/time/"); var target = new RelaxedFolderLocationValidator(); var actualLocation = new Uri("http://www.test.com/some/time/?stuff=true"); var actual = target.Matches(actualLocation, expectedLocation); actual.Should().BeTrue(); }
public void ValidationTypeIdentifiesUriOnlyTest() { var target = new RelaxedFolderLocationValidator(); target.ValidationType.Should().Be(LocationValidationType.UriOnly); }
public void MatchesLocationThrowsExceptionWithRelativeExpectedLocationTest() { var actualLocation = new Uri("http://www.test.com/some/time"); var expectedLocation = new Uri("/some/Time", UriKind.Relative); var target = new RelaxedFolderLocationValidator(); Action action = () => target.Matches(actualLocation, expectedLocation); action.ShouldThrow<ArgumentException>(); }
public void MatchesLocationThrowsExceptionWithNullExpectedLocationTest() { var expectedLocation = new Uri("http://www.test.com/some/Time"); var target = new RelaxedFolderLocationValidator(); Action action = () => target.Matches(null, expectedLocation); action.ShouldThrow<ArgumentNullException>(); }
public void MatchesLocationThrowsExceptionWithNullActualLocationTest() { var actualLocation = new Uri("http://www.test.com/some/time"); var target = new RelaxedFolderLocationValidator(); Action action = () => target.Matches(actualLocation, (Uri)null); action.ShouldThrow<ArgumentNullException>(); }
public void MatchesLocationReturnsTrueWithCaseInsensitivePathMatchingTest() { var expectedLocation = new Uri("http://www.test.com/some/Time"); var actualLocation = new Uri("http://www.test.com/some/time"); var target = new RelaxedFolderLocationValidator(); var actual = target.Matches(actualLocation, expectedLocation); actual.Should().BeTrue(); }