예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldMatchAsteriskAtStart()
        public virtual void ShouldMatchAsteriskAtStart()
        {
            UriPathWildcardMatcher matcher = new UriPathWildcardMatcher("*/some/uri/path");

            assertTrue(matcher.Matches("anything/i/like/followed/by/some/uri/path"));
            assertFalse(matcher.Matches("anything/i/like/followed/by/some/deliberately/changed/to/fail/uri/path"));
        }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldMatchMultipleAsterisksAtEndAndInMiddle()
        public virtual void ShouldMatchMultipleAsterisksAtEndAndInMiddle()
        {
            UriPathWildcardMatcher matcher = new UriPathWildcardMatcher("/some/uri/path/*/and/some/more/*/and/a/final/bit/*");

            assertTrue(matcher.Matches("/some/uri/path/with/middle/bit/and/some/more/with/additional/asterisk/part/and/a/final/bit/and/now" + "/some/post/amble"));
        }
예제 #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldMatchMultipleAsterisksAtStartAndInMiddle()
        public virtual void ShouldMatchMultipleAsterisksAtStartAndInMiddle()
        {
            UriPathWildcardMatcher matcher = new UriPathWildcardMatcher("*/some/uri/path/*/and/some/more/*/and/a/final/bit");

            assertTrue(matcher.Matches("a/bit/of/preamble/and/then/some/uri/path/with/middle/bit/and/some/more/with/additional/asterisk" + "/part/and/a/final/bit"));
        }
예제 #4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldMatchAsteriskInMiddle()
        public virtual void ShouldMatchAsteriskInMiddle()
        {
            UriPathWildcardMatcher matcher = new UriPathWildcardMatcher("/some/uri/path/*/and/some/more");

            assertTrue(matcher.Matches("/some/uri/path/with/middle/bit/and/some/more"));
        }
예제 #5
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldMatchAsteriskAtEnd()
        public virtual void ShouldMatchAsteriskAtEnd()
        {
            UriPathWildcardMatcher matcher = new UriPathWildcardMatcher("/some/uri/path/*");

            assertTrue(matcher.Matches("/some/uri/path/followed/by/anything/i/like"));
        }
예제 #6
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldFailWithoutAsteriskAtEnd()
        public virtual void ShouldFailWithoutAsteriskAtEnd()
        {
            UriPathWildcardMatcher matcher = new UriPathWildcardMatcher("/some/uri/path/and/some/more");

            assertFalse(matcher.Matches("/some/uri/path/with/middle/bit/and/some/more"));
        }
예제 #7
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldFailWithoutAsteriskAtStart()
        public virtual void ShouldFailWithoutAsteriskAtStart()
        {
            UriPathWildcardMatcher matcher = new UriPathWildcardMatcher("/some/uri/path");

            assertFalse(matcher.Matches("preamble/some/uri/path"));
        }
예제 #8
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldFailToMatchMultipleSimpleStringWithATrailingWildcard()
        public virtual void ShouldFailToMatchMultipleSimpleStringWithATrailingWildcard()
        {
            UriPathWildcardMatcher matcher = new UriPathWildcardMatcher("str*");

            assertFalse(matcher.Matches("my_str"));
        }
예제 #9
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldMatchMultipleSimpleStringWithALeadingWildcard()
        public virtual void ShouldMatchMultipleSimpleStringWithALeadingWildcard()
        {
            UriPathWildcardMatcher matcher = new UriPathWildcardMatcher("*str");

            assertTrue(matcher.Matches("my_str"));
        }