Update of 
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-qtags/src/test/java/org/xdoclet/plugin/qtags/qtags
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21143/src/test/java/org/xdoclet/plugin/qtags/qtags

Modified Files:
        QtagsTestCase.java 
Log Message:
Reformating with Jalopy

Index: QtagsTestCase.java
===================================================================
RCS file: 
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-qtags/src/test/java/org/xdoclet/plugin/qtags/qtags/QtagsTestCase.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** QtagsTestCase.java  2 Feb 2005 22:04:36 -0000       1.3
--- QtagsTestCase.java  31 May 2005 11:28:59 -0000      1.4
***************
*** 1,4 ****
--- 1,16 ----
+ /*
+  * Copyright (c) 2003
+  * XDoclet Team
+  * All rights reserved.
+  */
  package org.xdoclet.plugin.qtags.qtags;
  
+ import junit.framework.TestCase;
+ 
+ import java.util.Arrays;
+ import java.util.List;
+ 
+ import org.xdoclet.XDocletTag;
+ 
  import com.thoughtworks.qdox.model.AbstractJavaEntity;
  import com.thoughtworks.qdox.model.JavaClass;
***************
*** 6,14 ****
  import com.thoughtworks.qdox.model.JavaMethod;
  import com.thoughtworks.qdox.model.JavaSource;
- import junit.framework.TestCase;
- import org.xdoclet.XDocletTag;
- 
- import java.util.Arrays;
- import java.util.List;
  
  /**
--- 18,21 ----
***************
*** 19,38 ****
  public class QtagsTestCase extends TestCase {
      private JavaClass clazz;
-     private JavaMethod method;
-     private JavaMethod constructor;
      private JavaField field;
! 
!     protected void setUp() throws Exception {
!         super.setUp();
!         clazz = new JavaClass();
!         clazz.setParent(new JavaSource());
!         method = new JavaMethod();
!         method.setParent(clazz);
!         constructor = new JavaMethod();
!         constructor.setParent(clazz);
!         constructor.setConstructor(true);
!         field = new JavaField();
!         field.setParent(clazz);
!     }
  
      /**
--- 26,32 ----
  public class QtagsTestCase extends TestCase {
      private JavaClass clazz;
      private JavaField field;
!     private JavaMethod constructor;
!     private JavaMethod method;
  
      /**
***************
*** 42,45 ****
--- 36,40 ----
          allowedValueTag(method);
          allowedValueTag(clazz);
+ 
          try {
              allowedValueTag(field);
***************
*** 47,50 ****
--- 42,46 ----
          } catch (RuntimeException expected) {
          }
+ 
          try {
              allowedValueTag(constructor);
***************
*** 54,107 ****
      }
  
!     private XDocletTag allowedValueTag(AbstractJavaEntity entity) {
!         return new QtagsAllowedValueTagImpl(QtagsAllowedValueTagImpl.NAME, " 
blurge dsdh dsjk sdjk hdjkfh s", entity, 22);
!     }
! 
!     private XDocletTag defaultTag(AbstractJavaEntity entity) {
!         return new QtagsDefaultTagImpl(QtagsDefaultTagImpl.NAME, " blurge 
dsdh dsjk sdjk hdjkfh s", entity, 22);
!     }
! 
!     private XDocletTag deprecatedTag(AbstractJavaEntity entity) {
!         return new QtagsDeprecatedTagImpl(QtagsDeprecatedTagImpl.NAME, " 
blurge dsdh dsjk sdjk hdjkfh s", entity, 22);
!     }
! 
!     private XDocletTag ignoreTag(AbstractJavaEntity entity) {
!         return new QtagsIgnoreTagImpl(QtagsIgnoreTagImpl.NAME, " blurge dsdh 
dsjk sdjk hdjkfh s", entity, 22);
!     }
! 
!     private XDocletTag locationTag(AbstractJavaEntity entity, String value) {
!         return new QtagsLocationTagImpl(QtagsLocationTagImpl.NAME, value, 
entity, 22);
!     }
! 
!     private XDocletTag onceTag(AbstractJavaEntity entity) {
!         return new QtagsOnceTagImpl(QtagsOnceTagImpl.NAME, " blurge dsdh dsjk 
sdjk hdjkfh s", entity, 22);
!     }
! 
!     private XDocletTag requiredTag(AbstractJavaEntity entity) {
!         return new QtagsRequiredTagImpl(QtagsRequiredTagImpl.NAME, " blurge 
dsdh dsjk sdjk hdjkfh s", entity, 22);
!     }
  
-     public void testQtagsRequiredTagShouldOnlyBeAllowedOnMethodOnce() throws 
Exception {
-         XDocletTag tagOne = requiredTag(method);
-         XDocletTag tagTwo = requiredTag(method);
-         List tags = Arrays.asList(new XDocletTag[]{tagOne, tagTwo});
          try {
              method.setTags(tags);
! //            fail("only one is allowed");
          } catch (RuntimeException expected) {
          }
  
          try {
!             requiredTag(clazz);
              fail();
          } catch (RuntimeException expected) {
          }
          try {
!             requiredTag(field);
              fail();
          } catch (RuntimeException expected) {
          }
          try {
!             requiredTag(constructor);
              fail();
          } catch (RuntimeException expected) {
--- 50,78 ----
      }
  
!     public void testQtagsDefaultTagShouldOnlyBeAllowedOnMethodOnce() throws 
Exception {
!         XDocletTag tagOne = defaultTag(method);
!         XDocletTag tagTwo = defaultTag(method);
!         List tags = Arrays.asList(new XDocletTag[] {tagOne, tagTwo});
  
          try {
              method.setTags(tags);
!             //            fail("only one is allowed");
          } catch (RuntimeException expected) {
          }
  
          try {
!             defaultTag(clazz);
              fail();
          } catch (RuntimeException expected) {
          }
+ 
          try {
!             defaultTag(field);
              fail();
          } catch (RuntimeException expected) {
          }
+ 
          try {
!             defaultTag(constructor);
              fail();
          } catch (RuntimeException expected) {
***************
*** 109,134 ****
      }
  
!     public void testQtagsDefaultTagShouldOnlyBeAllowedOnMethodOnce() throws 
Exception {
!         XDocletTag tagOne = defaultTag(method);
!         XDocletTag tagTwo = defaultTag(method);
!         List tags = Arrays.asList(new XDocletTag[]{tagOne, tagTwo});
          try {
!             method.setTags(tags);
! //            fail("only one is allowed");
          } catch (RuntimeException expected) {
          }
  
          try {
!             defaultTag(clazz);
              fail();
          } catch (RuntimeException expected) {
          }
          try {
!             defaultTag(field);
              fail();
          } catch (RuntimeException expected) {
          }
          try {
!             defaultTag(constructor);
              fail();
          } catch (RuntimeException expected) {
--- 80,108 ----
      }
  
!     public void testQtagsDeprecatedTagShouldOnlyBeAllowedOnClassOnce() throws 
Exception {
!         XDocletTag tagOne = deprecatedTag(clazz);
!         XDocletTag tagTwo = deprecatedTag(clazz);
!         List tags = Arrays.asList(new XDocletTag[] {tagOne, tagTwo});
! 
          try {
!             clazz.setTags(tags);
!             //            fail("only one is allowed");
          } catch (RuntimeException expected) {
          }
  
          try {
!             deprecatedTag(method);
              fail();
          } catch (RuntimeException expected) {
          }
+ 
          try {
!             deprecatedTag(field);
              fail();
          } catch (RuntimeException expected) {
          }
+ 
          try {
!             deprecatedTag(constructor);
              fail();
          } catch (RuntimeException expected) {
***************
*** 136,161 ****
      }
  
!     public void testQtagsDeprecatedTagShouldOnlyBeAllowedOnClassOnce() throws 
Exception {
!         XDocletTag tagOne = deprecatedTag(clazz);
!         XDocletTag tagTwo = deprecatedTag(clazz);
!         List tags = Arrays.asList(new XDocletTag[]{tagOne, tagTwo});
          try {
              clazz.setTags(tags);
! //            fail("only one is allowed");
          } catch (RuntimeException expected) {
          }
  
          try {
!             deprecatedTag(method);
              fail();
          } catch (RuntimeException expected) {
          }
          try {
!             deprecatedTag(field);
              fail();
          } catch (RuntimeException expected) {
          }
          try {
!             deprecatedTag(constructor);
              fail();
          } catch (RuntimeException expected) {
--- 110,138 ----
      }
  
!     public void testQtagsIgnoreTagShouldOnlyBeAllowedOnClassOnce() throws 
Exception {
!         XDocletTag tagOne = ignoreTag(clazz);
!         XDocletTag tagTwo = ignoreTag(clazz);
!         List tags = Arrays.asList(new XDocletTag[] {tagOne, tagTwo});
! 
          try {
              clazz.setTags(tags);
!             //            fail("only one is allowed");
          } catch (RuntimeException expected) {
          }
  
          try {
!             ignoreTag(method);
              fail();
          } catch (RuntimeException expected) {
          }
+ 
          try {
!             ignoreTag(field);
              fail();
          } catch (RuntimeException expected) {
          }
+ 
          try {
!             ignoreTag(constructor);
              fail();
          } catch (RuntimeException expected) {
***************
*** 163,188 ****
      }
  
!     public void testQtagsIgnoreTagShouldOnlyBeAllowedOnClassOnce() throws 
Exception {
!         XDocletTag tagOne = ignoreTag(clazz);
!         XDocletTag tagTwo = ignoreTag(clazz);
!         List tags = Arrays.asList(new XDocletTag[]{tagOne, tagTwo});
          try {
              clazz.setTags(tags);
! //            fail("only one is allowed");
          } catch (RuntimeException expected) {
          }
  
          try {
!             ignoreTag(method);
              fail();
          } catch (RuntimeException expected) {
          }
          try {
!             ignoreTag(field);
              fail();
          } catch (RuntimeException expected) {
          }
          try {
!             ignoreTag(constructor);
              fail();
          } catch (RuntimeException expected) {
--- 140,178 ----
      }
  
!     public void 
testQtagsLocationTagShouldOnlyBeAllowedOnClassWithConstrainedValues()
!         throws Exception {
!         XDocletTag tagOne = locationTag(clazz, "class");
!         XDocletTag tagTwo = locationTag(clazz, "method");
!         XDocletTag tagThree = locationTag(clazz, "field");
!         XDocletTag tagFour = locationTag(clazz, "constructor");
! 
!         try {
!             locationTag(clazz, "blah");
!             fail();
!         } catch (RuntimeException expected) {
!         }
! 
!         List tags = Arrays.asList(new XDocletTag[] {tagOne, tagTwo, tagThree, 
tagFour});
! 
          try {
              clazz.setTags(tags);
!             //            fail("only one is allowed");
          } catch (RuntimeException expected) {
          }
  
          try {
!             locationTag(method, "method");
              fail();
          } catch (RuntimeException expected) {
          }
+ 
          try {
!             locationTag(field, "field");
              fail();
          } catch (RuntimeException expected) {
          }
+ 
          try {
!             locationTag(constructor, "constructor");
              fail();
          } catch (RuntimeException expected) {
***************
*** 193,200 ****
          XDocletTag tagOne = onceTag(clazz);
          XDocletTag tagTwo = onceTag(clazz);
!         List tags = Arrays.asList(new XDocletTag[]{tagOne, tagTwo});
          try {
              clazz.setTags(tags);
! //            fail("only one is allowed");
          } catch (RuntimeException expected) {
          }
--- 183,191 ----
          XDocletTag tagOne = onceTag(clazz);
          XDocletTag tagTwo = onceTag(clazz);
!         List tags = Arrays.asList(new XDocletTag[] {tagOne, tagTwo});
! 
          try {
              clazz.setTags(tags);
!             //            fail("only one is allowed");
          } catch (RuntimeException expected) {
          }
***************
*** 205,208 ****
--- 196,200 ----
          } catch (RuntimeException expected) {
          }
+ 
          try {
              onceTag(field);
***************
*** 210,213 ****
--- 202,206 ----
          } catch (RuntimeException expected) {
          }
+ 
          try {
              onceTag(constructor);
***************
*** 217,251 ****
      }
  
!     public void 
testQtagsLocationTagShouldOnlyBeAllowedOnClassWithConstrainedValues() throws 
Exception {
!         XDocletTag tagOne = locationTag(clazz, "class");
!         XDocletTag tagTwo = locationTag(clazz, "method");
!         XDocletTag tagThree = locationTag(clazz, "field");
!         XDocletTag tagFour = locationTag(clazz, "constructor");
! 
!         try {
!             locationTag(clazz, "blah");
!             fail();
!         } catch (RuntimeException expected) {
!         }
  
-         List tags = Arrays.asList(new XDocletTag[]{tagOne, tagTwo, tagThree, 
tagFour});
          try {
!             clazz.setTags(tags);
! //            fail("only one is allowed");
          } catch (RuntimeException expected) {
          }
  
          try {
!             locationTag(method, "method");
              fail();
          } catch (RuntimeException expected) {
          }
          try {
!             locationTag(field, "field");
              fail();
          } catch (RuntimeException expected) {
          }
          try {
!             locationTag(constructor, "constructor");
              fail();
          } catch (RuntimeException expected) {
--- 210,238 ----
      }
  
!     public void testQtagsRequiredTagShouldOnlyBeAllowedOnMethodOnce() throws 
Exception {
!         XDocletTag tagOne = requiredTag(method);
!         XDocletTag tagTwo = requiredTag(method);
!         List tags = Arrays.asList(new XDocletTag[] {tagOne, tagTwo});
  
          try {
!             method.setTags(tags);
!             //            fail("only one is allowed");
          } catch (RuntimeException expected) {
          }
  
          try {
!             requiredTag(clazz);
              fail();
          } catch (RuntimeException expected) {
          }
+ 
          try {
!             requiredTag(field);
              fail();
          } catch (RuntimeException expected) {
          }
+ 
          try {
!             requiredTag(constructor);
              fail();
          } catch (RuntimeException expected) {
***************
*** 253,255 ****
--- 240,282 ----
      }
  
+     protected void setUp() throws Exception {
+         super.setUp();
+         clazz = new JavaClass();
+         clazz.setParent(new JavaSource());
+         method = new JavaMethod();
+         method.setParent(clazz);
+         constructor = new JavaMethod();
+         constructor.setParent(clazz);
+         constructor.setConstructor(true);
+         field = new JavaField();
+         field.setParent(clazz);
+     }
+ 
+     private XDocletTag allowedValueTag(AbstractJavaEntity entity) {
+         return new QtagsAllowedValueTagImpl(QtagsAllowedValueTagImpl.NAME, " 
blurge dsdh dsjk sdjk hdjkfh s", entity, 22);
+     }
+ 
+     private XDocletTag defaultTag(AbstractJavaEntity entity) {
+         return new QtagsDefaultTagImpl(QtagsDefaultTagImpl.NAME, " blurge 
dsdh dsjk sdjk hdjkfh s", entity, 22);
+     }
+ 
+     private XDocletTag deprecatedTag(AbstractJavaEntity entity) {
+         return new QtagsDeprecatedTagImpl(QtagsDeprecatedTagImpl.NAME, " 
blurge dsdh dsjk sdjk hdjkfh s", entity, 22);
+     }
+ 
+     private XDocletTag ignoreTag(AbstractJavaEntity entity) {
+         return new QtagsIgnoreTagImpl(QtagsIgnoreTagImpl.NAME, " blurge dsdh 
dsjk sdjk hdjkfh s", entity, 22);
+     }
+ 
+     private XDocletTag locationTag(AbstractJavaEntity entity, String value) {
+         return new QtagsLocationTagImpl(QtagsLocationTagImpl.NAME, value, 
entity, 22);
+     }
+ 
+     private XDocletTag onceTag(AbstractJavaEntity entity) {
+         return new QtagsOnceTagImpl(QtagsOnceTagImpl.NAME, " blurge dsdh dsjk 
sdjk hdjkfh s", entity, 22);
+     }
+ 
+     private XDocletTag requiredTag(AbstractJavaEntity entity) {
+         return new QtagsRequiredTagImpl(QtagsRequiredTagImpl.NAME, " blurge 
dsdh dsjk sdjk hdjkfh s", entity, 22);
+     }
  }
\ No newline at end of file



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
xdoclet-plugins-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-commits

Reply via email to