You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by gt...@apache.org on 2011/07/19 17:23:57 UTC
svn commit: r1148392 -
/river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java
Author: gtrasuk
Date: Tue Jul 19 15:23:56 2011
New Revision: 1148392
URL: http://svn.apache.org/viewvc?rev=1148392&view=rev
Log:
Continuing work on classloading for surrogate modules.
Modified:
river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java
Modified: river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java?rev=1148392&r1=1148391&r2=1148392&view=diff
==============================================================================
--- river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java (original)
+++ river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java Tue Jul 19 15:23:56 2011
@@ -97,4 +97,19 @@ public class ClasspathFilterParserTest {
assertFalse(cpf.acceptsClass("org,apache.XYZ"));
assertTrue(cpf.acceptsClass("org.apache.DEF"));
}
+
+ /**
+ If there's no class specifications, should accept all class possibilities.
+ @throws Exception
+ */
+ @Test
+ public void testFilterAcceptanceWithJarOnly() throws Exception {
+ ClasspathFilterBuilder UUT = new ClasspathFilterBuilder();
+ String jarSpec = "reggie.jar";
+ ClasspathFilter cpf = UUT.parseToFilter(jarSpec);
+ assertEquals("reggie.jar", cpf.getJarName());
+ assertTrue(cpf.acceptsClass("org.apache.ABC"));
+ assertTrue(cpf.acceptsClass("org,apache.XYZ"));
+ assertTrue(cpf.acceptsClass("org.apache.DEF"));
+ }
}
Re: svn commit: r1148392 - /river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java
Posted by Peter Firmstone <ji...@zeus.net.au>.
That's cool mate, you've been working away quietly, didn't want you
thinking we hadn't noticed.
Cheers,
Peter.
Greg Trasuk wrote:
> Good catch, Peter. Yes, it's a typo. Mind you, as a proponent of
> "Test-first" code, I haven't yet written the code that's being tested.
> I'd like to think I'd have found it at some point...
>
> Cheers,
>
> Greg Trasuk.
>
> On Tue, 2011-07-19 at 18:09, Peter Firmstone wrote:
>
>> gtrasuk@apache.org wrote:
>>
>>> Author: gtrasuk
>>> Date: Tue Jul 19 15:23:56 2011
>>> New Revision: 1148392
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1148392&view=rev
>>> Log:
>>> Continuing work on classloading for surrogate modules.
>>>
>>> Modified:
>>> river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java
>>>
>>> Modified: river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java
>>> URL: http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java?rev=1148392&r1=1148391&r2=1148392&view=diff
>>> ==============================================================================
>>> --- river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java (original)
>>> +++ river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java Tue Jul 19 15:23:56 2011
>>> @@ -97,4 +97,19 @@ public class ClasspathFilterParserTest {
>>> assertFalse(cpf.acceptsClass("org,apache.XYZ"));
>>> assertTrue(cpf.acceptsClass("org.apache.DEF"));
>>> }
>>> +
>>> + /**
>>> + If there's no class specifications, should accept all class possibilities.
>>> + @throws Exception
>>> + */
>>> + @Test
>>> + public void testFilterAcceptanceWithJarOnly() throws Exception {
>>> + ClasspathFilterBuilder UUT = new ClasspathFilterBuilder();
>>> + String jarSpec = "reggie.jar";
>>> + ClasspathFilter cpf = UUT.parseToFilter(jarSpec);
>>> + assertEquals("reggie.jar", cpf.getJarName());
>>> + assertTrue(cpf.acceptsClass("org.apache.ABC"));
>>>
>>>
>> Greg, is the comma in the line below a typo? Same comma on the first
>> assertFalse line above too.
>>
>>
>>> + assertTrue(cpf.acceptsClass("org,apache.XYZ"));
>>> + assertTrue(cpf.acceptsClass("org.apache.DEF"));
>>> + }
>>> }
>>>
>>>
>>>
>>>
>>>
>
>
>
Re: svn commit: r1148392 -
/river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java
Posted by Greg Trasuk <tr...@stratuscom.com>.
Good catch, Peter. Yes, it's a typo. Mind you, as a proponent of
"Test-first" code, I haven't yet written the code that's being tested.
I'd like to think I'd have found it at some point...
Cheers,
Greg Trasuk.
On Tue, 2011-07-19 at 18:09, Peter Firmstone wrote:
> gtrasuk@apache.org wrote:
> > Author: gtrasuk
> > Date: Tue Jul 19 15:23:56 2011
> > New Revision: 1148392
> >
> > URL: http://svn.apache.org/viewvc?rev=1148392&view=rev
> > Log:
> > Continuing work on classloading for surrogate modules.
> >
> > Modified:
> > river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java
> >
> > Modified: river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java
> > URL: http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java?rev=1148392&r1=1148391&r2=1148392&view=diff
> > ==============================================================================
> > --- river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java (original)
> > +++ river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java Tue Jul 19 15:23:56 2011
> > @@ -97,4 +97,19 @@ public class ClasspathFilterParserTest {
> > assertFalse(cpf.acceptsClass("org,apache.XYZ"));
> > assertTrue(cpf.acceptsClass("org.apache.DEF"));
> > }
> > +
> > + /**
> > + If there's no class specifications, should accept all class possibilities.
> > + @throws Exception
> > + */
> > + @Test
> > + public void testFilterAcceptanceWithJarOnly() throws Exception {
> > + ClasspathFilterBuilder UUT = new ClasspathFilterBuilder();
> > + String jarSpec = "reggie.jar";
> > + ClasspathFilter cpf = UUT.parseToFilter(jarSpec);
> > + assertEquals("reggie.jar", cpf.getJarName());
> > + assertTrue(cpf.acceptsClass("org.apache.ABC"));
> >
>
> Greg, is the comma in the line below a typo? Same comma on the first
> assertFalse line above too.
>
> > + assertTrue(cpf.acceptsClass("org,apache.XYZ"));
> > + assertTrue(cpf.acceptsClass("org.apache.DEF"));
> > + }
> > }
> >
> >
> >
> >
Re: svn commit: r1148392 - /river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java
Posted by Peter Firmstone <ji...@zeus.net.au>.
gtrasuk@apache.org wrote:
> Author: gtrasuk
> Date: Tue Jul 19 15:23:56 2011
> New Revision: 1148392
>
> URL: http://svn.apache.org/viewvc?rev=1148392&view=rev
> Log:
> Continuing work on classloading for surrogate modules.
>
> Modified:
> river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java
>
> Modified: river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java
> URL: http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java?rev=1148392&r1=1148391&r2=1148392&view=diff
> ==============================================================================
> --- river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java (original)
> +++ river/jtsk/skunk/surrogate/test/org/apache/river/container/classloading/ClasspathFilterParserTest.java Tue Jul 19 15:23:56 2011
> @@ -97,4 +97,19 @@ public class ClasspathFilterParserTest {
> assertFalse(cpf.acceptsClass("org,apache.XYZ"));
> assertTrue(cpf.acceptsClass("org.apache.DEF"));
> }
> +
> + /**
> + If there's no class specifications, should accept all class possibilities.
> + @throws Exception
> + */
> + @Test
> + public void testFilterAcceptanceWithJarOnly() throws Exception {
> + ClasspathFilterBuilder UUT = new ClasspathFilterBuilder();
> + String jarSpec = "reggie.jar";
> + ClasspathFilter cpf = UUT.parseToFilter(jarSpec);
> + assertEquals("reggie.jar", cpf.getJarName());
> + assertTrue(cpf.acceptsClass("org.apache.ABC"));
>
Greg, is the comma in the line below a typo? Same comma on the first
assertFalse line above too.
> + assertTrue(cpf.acceptsClass("org,apache.XYZ"));
> + assertTrue(cpf.acceptsClass("org.apache.DEF"));
> + }
> }
>
>
>
>