Update of /cvsroot/webmacro/webmacro/test/unit/org/webmacro/engine
In directory sc8-pr-cvs1:/tmp/cvs-serv6675/test/unit/org/webmacro/engine
Modified Files:
TestStaticClasses.java
Log Message:
If this doesn't drive our SF "activity" stats through the roof, I don't know what will.
Mass re-formatting of all code, following (to the best of my interpertation) the Sun (w/ jakarta tweaks) coding style guidelines defined here: http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html and here: http://jakarta.apache.org/turbine/common/code-standards.html
I did this reformatting with IDEA 3.0.5, and I am going to commit the style configuration for IDEA (if I can find it).
Index: TestStaticClasses.java
===================================================================
RCS file: /cvsroot/webmacro/webmacro/test/unit/org/webmacro/engine/TestStaticClasses.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TestStaticClasses.java 10 Nov 2002 21:45:46 -0000 1.1
--- TestStaticClasses.java 12 Jun 2003 00:47:49 -0000 1.2
***************
*** 9,21 ****
package org.webmacro.engine;
- import junit.framework.TestCase;
- import org.webmacro.template.TemplateTestCase;
import org.webmacro.Context;
! public class TestStaticClasses extends TemplateTestCase {
! public static class Simple {
! public static String foo (String arg, String arg2) {
! if (arg == null)
return "arg is null";
else
--- 9,23 ----
package org.webmacro.engine;
import org.webmacro.Context;
+ import org.webmacro.template.TemplateTestCase;
! public class TestStaticClasses extends TemplateTestCase
! {
! public static class Simple
! {
! public static String foo (String arg, String arg2)
! {
! if (arg == null)
return "arg is null";
else
***************
*** 24,41 ****
}
! public TestStaticClasses(String s) {
super(s);
}
! protected void stuffContext(Context context) throws Exception {
! _context.put ("SimpleInstance", new Simple());
! _context.put ("SimpleClass", Simple.class);
}
! public void testStaticClassWithNullAsFirstArg_1 () throws Exception {
assertEvalutionEquals("$SimpleClass.foo(null, null)", "arg is null");
assertEvalutionEquals("$SimpleInstance.foo(null, null)", "arg is null");
}
! public void testStaticClassWithNullAsFirstArg_2 () throws Exception {
executeStringTemplate("$SimpleClass.foo(null, null)");
executeStringTemplate("$SimpleInstance.foo(null, null)");
--- 26,52 ----
}
!
! public TestStaticClasses (String s)
! {
super(s);
}
!
! protected void stuffContext (Context context) throws Exception
! {
! _context.put("SimpleInstance", new Simple());
! _context.put("SimpleClass", Simple.class);
}
!
! public void testStaticClassWithNullAsFirstArg_1 () throws Exception
! {
assertEvalutionEquals("$SimpleClass.foo(null, null)", "arg is null");
assertEvalutionEquals("$SimpleInstance.foo(null, null)", "arg is null");
}
!
!
! public void testStaticClassWithNullAsFirstArg_2 () throws Exception
! {
executeStringTemplate("$SimpleClass.foo(null, null)");
executeStringTemplate("$SimpleInstance.foo(null, null)");
|