@@ -0,0 +1,1934 @@
+/**%0A The MIT License%0A%0ACopyright (c) 2011 Michael O'Cleirigh%0A%0APermission is hereby granted, free of charge, to any person obtaining a copy%0Aof this software and associated documentation files (the %22Software%22), to deal%0Ain the Software without restriction, including without limitation the rights%0Ato use, copy, modify, merge, publish, distribute, sublicense, and/or sell%0Acopies of the Software, and to permit persons to whom the Software is%0Afurnished to do so, subject to the following conditions:%0A%0AThe above copyright notice and this permission notice shall be included in%0Aall copies or substantial portions of the Software.%0A%0ATHE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0AIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0AFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE%0AAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER%0ALIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,%0AOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN%0ATHE SOFTWARE.%0A%0A%0A%0A */%0Apackage org.jenkinsci.plugins.api;%0A%0Aimport junit.framework.TestCase;%0A%0A/**%0A * @author mocleiri%0A *%0A */%0Apublic class TestGithubWebHookUrlRegEx extends TestCase %7B%0A%0A%09/**%0A%09 * %0A%09 */%0A%09public TestGithubWebHookUrlRegEx() %7B%0A%09%09// TODO Auto-generated constructor stub%0A%09%7D%0A%0A%09/**%0A%09 * @param name%0A%09 */%0A%09public TestGithubWebHookUrlRegEx(String name) %7B%0A%09%09super(name);%0A%09%09// TODO Auto-generated constructor stub%0A%09%7D%0A%09%0A%09%0A%09public void testRootedWebHookRegEx() %7B%0A%09%09%0A%09%09String regex = %22.*github-webhook.*%22;%0A%09%09%0A%09%09String url = %22/github-webhook%22;%0A%09%09%0A%09%09assertTrue(url.matches(regex));%0A%09%09%0A%09%09String questionUrl = %22/github-webhook/?%22;%0A%09%09%0A%09%09assertTrue(questionUrl.matches(regex));%0A%09%09%0A%09%09String nested= %22/nesting/github-webhook%22;%0A%0A%09%09assertTrue(nested.matches(regex));%0A%09%09%0A%09%09String questionNested= %22/nesting/github-webhook%22;%0A%09%09%0A%09%09assertTrue(questionNested.matches(regex));%0A%09%09%0A%09%7D%0A%0A%7D%0A

Add testcase for issue #6 and issue #1