You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ba...@apache.org on 2008/07/27 23:33:17 UTC

svn commit: r680192 - /james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/

Author: bago
Date: Sun Jul 27 14:33:17 2008
New Revision: 680192

URL: http://svn.apache.org/viewvc?rev=680192&view=rev
Log:
Use a better name for the test descriptor class

Modified:
    james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/AbstractYamlTest.java
    james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/MailZoneAsynchronousYamlTest.java
    james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/MailZoneYamlTest.java
    james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/RFC4408AsynchronousYamlTest.java
    james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/RFC4408YamlTest.java
    james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/SPFYamlTest.java
    james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/YamlTest.java

Modified: james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/AbstractYamlTest.java
URL: http://svn.apache.org/viewvc/james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/AbstractYamlTest.java?rev=680192&r1=680191&r2=680192&view=diff
==============================================================================
--- james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/AbstractYamlTest.java (original)
+++ james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/AbstractYamlTest.java Sun Jul 27 14:33:17 2008
@@ -88,24 +88,24 @@
     protected static final int STAGED_EXECUTOR_DNSJNIO = 4;
     private int spfExecutorType = SYNCHRONOUS_EXECUTOR;
 
-    SPFYamlTestSuite data;
+    SPFYamlTestDescriptor data;
     String test;
     protected Logger log;
     private SPFExecutor executor;
     protected static MacroExpand macroExpand;
     protected static SPF spf;
-    protected static SPFYamlTestSuite prevData;
+    protected static SPFYamlTestDescriptor prevData;
     protected static SPFRecordParser parser;
     private static DNSService dns;
     protected static DNSTestingServer dnsTestServer;
 
-    protected AbstractYamlTest(SPFYamlTestSuite def, String test) {
+    protected AbstractYamlTest(SPFYamlTestDescriptor def, String test) {
         super(def.getComment()+" #"+test);
         this.data = def;
         this.test = test;
     }
 
-    protected AbstractYamlTest(SPFYamlTestSuite def) {
+    protected AbstractYamlTest(SPFYamlTestDescriptor def) {
         super(def.getComment()+" #COMPLETE!");
         this.data = def;
         this.test = null;
@@ -122,7 +122,7 @@
         List tests = internalLoadTests(getFilename());
         Iterator i = tests.iterator();
         while (i.hasNext() && data == null) {
-            SPFYamlTestSuite def = (SPFYamlTestSuite) i.next();
+            SPFYamlTestDescriptor def = (SPFYamlTestDescriptor) i.next();
             if (name.equals(def.getComment()+" #COMPLETE!")) {
                 data = def;
                 this.test = null;
@@ -156,7 +156,7 @@
                 Object o = ctor.getData();
                 if (o instanceof HashMap) {
                   HashMap m = (HashMap) o;
-                  SPFYamlTestSuite ts = new SPFYamlTestSuite(m, i);
+                  SPFYamlTestDescriptor ts = new SPFYamlTestDescriptor(m, i);
                   tests.add(ts);
                 }
                 i++;
@@ -532,15 +532,12 @@
         return spfExecutorType;
     }
 
-    protected static class SPFYamlTestSuite {
-        public String comment;
-        public HashMap tests;
+    protected static class SPFYamlTestDescriptor {
+        private String comment;
+        private HashMap tests;
         private HashMap zonedata;
-        public String getComment() {
-            return comment;
-        }
         
-        public SPFYamlTestSuite(HashMap source, int i) {
+        public SPFYamlTestDescriptor(HashMap source, int i) {
             this.setComment((String) source.get("description"));
             if (this.getComment() == null) {
                 this.setComment("Test #"+i); 
@@ -549,6 +546,9 @@
             this.setZonedata((HashMap) source.get("zonedata"));
         }
         
+        public String getComment() {
+            return comment;
+        }
         public void setComment(String comment) {
             this.comment = comment;
         }

Modified: james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/MailZoneAsynchronousYamlTest.java
URL: http://svn.apache.org/viewvc/james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/MailZoneAsynchronousYamlTest.java?rev=680192&r1=680191&r2=680192&view=diff
==============================================================================
--- james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/MailZoneAsynchronousYamlTest.java (original)
+++ james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/MailZoneAsynchronousYamlTest.java Sun Jul 27 14:33:17 2008
@@ -40,11 +40,11 @@
         super(name);
     }
 
-    protected MailZoneAsynchronousYamlTest(SPFYamlTestSuite def, String test) {
+    protected MailZoneAsynchronousYamlTest(SPFYamlTestDescriptor def, String test) {
         super(def, test);
     }
 
-    protected MailZoneAsynchronousYamlTest(SPFYamlTestSuite def) {
+    protected MailZoneAsynchronousYamlTest(SPFYamlTestDescriptor def) {
         super(def);
     }
 
@@ -83,7 +83,7 @@
             List tests = loadTests(YAMLFILE2);
             Iterator i = tests.iterator();
             while (i.hasNext()) {
-                SPFYamlTestSuite o = (SPFYamlTestSuite) i.next();
+                SPFYamlTestDescriptor o = (SPFYamlTestDescriptor) i.next();
                 addTest(new MailZoneAsynchronousYamlTest(o));
             }
         }

Modified: james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/MailZoneYamlTest.java
URL: http://svn.apache.org/viewvc/james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/MailZoneYamlTest.java?rev=680192&r1=680191&r2=680192&view=diff
==============================================================================
--- james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/MailZoneYamlTest.java (original)
+++ james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/MailZoneYamlTest.java Sun Jul 27 14:33:17 2008
@@ -40,11 +40,11 @@
         super(name);
     }
 
-    protected MailZoneYamlTest(SPFYamlTestSuite def, String test) {
+    protected MailZoneYamlTest(SPFYamlTestDescriptor def, String test) {
         super(def, test);
     }
 
-    protected MailZoneYamlTest(SPFYamlTestSuite def) {
+    protected MailZoneYamlTest(SPFYamlTestDescriptor def) {
         super(def);
     }
 
@@ -74,7 +74,7 @@
             List tests = loadTests(YAMLFILE2);
             Iterator i = tests.iterator();
             while (i.hasNext()) {
-                SPFYamlTestSuite o = (SPFYamlTestSuite) i.next();
+                SPFYamlTestDescriptor o = (SPFYamlTestDescriptor) i.next();
                 Iterator ttt = o.getTests().keySet().iterator();
                 while (ttt.hasNext()) {
                     addTest(new MailZoneYamlTest(o,(String) ttt.next()));

Modified: james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/RFC4408AsynchronousYamlTest.java
URL: http://svn.apache.org/viewvc/james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/RFC4408AsynchronousYamlTest.java?rev=680192&r1=680191&r2=680192&view=diff
==============================================================================
--- james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/RFC4408AsynchronousYamlTest.java (original)
+++ james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/RFC4408AsynchronousYamlTest.java Sun Jul 27 14:33:17 2008
@@ -41,11 +41,11 @@
         super(name);
     }
 
-    protected RFC4408AsynchronousYamlTest(SPFYamlTestSuite def) {
+    protected RFC4408AsynchronousYamlTest(SPFYamlTestDescriptor def) {
         super(def);
     }
 
-    protected RFC4408AsynchronousYamlTest(SPFYamlTestSuite def, String test) {
+    protected RFC4408AsynchronousYamlTest(SPFYamlTestDescriptor def, String test) {
         super(def, test);
     }
 
@@ -76,7 +76,7 @@
             List tests = loadTests(YAMLFILE2);
             Iterator i = tests.iterator();
             while (i.hasNext()) {
-                SPFYamlTestSuite o = (SPFYamlTestSuite) i.next();
+                SPFYamlTestDescriptor o = (SPFYamlTestDescriptor) i.next();
                 addTest(new RFC4408AsynchronousYamlTest(o));
             }
         }
@@ -100,7 +100,7 @@
         List tests = loadTests(YAMLFILE2);
         Iterator i = tests.iterator();
         while (i.hasNext()) {
-            SPFYamlTestSuite o = (SPFYamlTestSuite) i.next();
+            SPFYamlTestDescriptor o = (SPFYamlTestDescriptor) i.next();
             Iterator ttt = o.getTests().keySet().iterator();
             while (ttt.hasNext()) {
                 RFC4408AsynchronousYamlTest t = new RFC4408AsynchronousYamlTest(o,(String) ttt.next());

Modified: james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/RFC4408YamlTest.java
URL: http://svn.apache.org/viewvc/james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/RFC4408YamlTest.java?rev=680192&r1=680191&r2=680192&view=diff
==============================================================================
--- james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/RFC4408YamlTest.java (original)
+++ james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/RFC4408YamlTest.java Sun Jul 27 14:33:17 2008
@@ -42,11 +42,11 @@
         super(name);
     }
 
-    protected RFC4408YamlTest(SPFYamlTestSuite def) {
+    protected RFC4408YamlTest(SPFYamlTestDescriptor def) {
         super(def);
     }
 
-    protected RFC4408YamlTest(SPFYamlTestSuite def, String test) {
+    protected RFC4408YamlTest(SPFYamlTestDescriptor def, String test) {
         super(def, test);
     }
 
@@ -70,7 +70,7 @@
                 List tests = loadTests(YAMLFILE2);
                 Iterator i = tests.iterator();
                 while (i.hasNext()) {
-                    SPFYamlTestSuite o = (SPFYamlTestSuite) i.next();
+                    SPFYamlTestDescriptor o = (SPFYamlTestDescriptor) i.next();
                     Iterator ttt = o.getTests().keySet().iterator();
                     while (ttt.hasNext()) {
                         addTest(new RFC4408YamlTest(o,(String) ttt.next()));
@@ -106,7 +106,7 @@
         List tests = loadTests(YAMLFILE2);
         Iterator i = tests.iterator();
         while (i.hasNext()) {
-            SPFYamlTestSuite o = (SPFYamlTestSuite) i.next();
+            SPFYamlTestDescriptor o = (SPFYamlTestDescriptor) i.next();
             Iterator ttt = o.getTests().keySet().iterator();
             while (ttt.hasNext()) {
                 RFC4408YamlTest t = new RFC4408YamlTest(o,(String) ttt.next());

Modified: james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/SPFYamlTest.java
URL: http://svn.apache.org/viewvc/james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/SPFYamlTest.java?rev=680192&r1=680191&r2=680192&view=diff
==============================================================================
--- james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/SPFYamlTest.java (original)
+++ james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/SPFYamlTest.java Sun Jul 27 14:33:17 2008
@@ -35,7 +35,7 @@
         super(name);
     }
 
-    protected SPFYamlTest(SPFYamlTestSuite def, String test) {
+    protected SPFYamlTest(SPFYamlTestDescriptor def, String test) {
         super(def, test);
     }
 
@@ -56,7 +56,7 @@
             List tests = loadTests(YAMLFILE);
             Iterator i = tests.iterator();
             while (i.hasNext()) {
-                SPFYamlTestSuite o = (SPFYamlTestSuite) i.next();
+                SPFYamlTestDescriptor o = (SPFYamlTestDescriptor) i.next();
                 Iterator ttt = o.getTests().keySet().iterator();
                 while (ttt.hasNext()) {
                     addTest(new SPFYamlTest(o,(String) ttt.next()));

Modified: james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/YamlTest.java
URL: http://svn.apache.org/viewvc/james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/YamlTest.java?rev=680192&r1=680191&r2=680192&view=diff
==============================================================================
--- james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/YamlTest.java (original)
+++ james/jspf/branches/multimodule-proposal/resolver/src/test/java/org/apache/james/jspf/YamlTest.java Sun Jul 27 14:33:17 2008
@@ -38,7 +38,7 @@
         super(name);
     }
 
-    protected YamlTest(SPFYamlTestSuite def, String test) {
+    protected YamlTest(SPFYamlTestDescriptor def, String test) {
         super(def, test);
     }
 
@@ -61,7 +61,7 @@
             List tests = loadTests(YAMLFILE2);
             Iterator i = tests.iterator();
             while (i.hasNext()) {
-                SPFYamlTestSuite o = (SPFYamlTestSuite) i.next();
+                SPFYamlTestDescriptor o = (SPFYamlTestDescriptor) i.next();
                 Iterator ttt = o.getTests().keySet().iterator();
                 while (ttt.hasNext()) {
                     addTest(new YamlTest(o,(String) ttt.next()));



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org