cvs commit: spice/sandbox/repository/componenthaus/src/tests/org/componenthaus/ant ComponentMetadataTaskTestCase.java

Mike Hogan <[email protected]> Wed, 05 Nov 2003 11:35:50 -0800
Newsgroups gmane.comp.java.spice.cvs
Message-ID <[email protected]>
hogie       03/11/05 11:35:50

  Modified:    sandbox/repository/componenthaus/src/tests/org/componenthaus/ant
                        ComponentMetadataTaskTestCase.java
  Log:
  * Can have classes as service interfaces
   * Can have more than one service interface per submission
  
  Revision  Changes    Path
  1.2       +7 -7      spice/sandbox/repository/componenthaus/src/tests/org/componenthaus/ant/ComponentMetadataTaskTestCase.java
  
  Index: ComponentMetadataTaskTestCase.java
  ===================================================================
  RCS file: /cvsroot/spice/spice/sandbox/repository/componenthaus/src/tests/org/componenthaus/ant/ComponentMetadataTaskTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ComponentMetadataTaskTestCase.java	26 Oct 2003 13:46:42 -0000	1.1
  +++ ComponentMetadataTaskTestCase.java	5 Nov 2003 19:35:50 -0000	1.2
  @@ -178,6 +178,7 @@
           assertEquals(fullyQualifiedInterfaceName, expected.getInterfaceName());
       }
   
  +/*
       public void testThrowsAnExceptionWhenInterfaceIsAClass() throws IOException {
           createJavaSourceFile(sourceDirectory, new Javaclass(
                   packageName,
  @@ -185,17 +186,18 @@
                   someJavadoc,
                   null), createdFiles);
           final ComponentMetadataTask task = new ComponentMetadataTask(fullyQualifiedInterfaceName,sourceDirectory,targetDirectory);
  -        NotAnInterfaceBuildException expected = null;
  +        NotAPublicInterfaceBuildException expected = null;
           try {
               task.execute();
               fail("Did not get expected exception");
  -        } catch (NotAnInterfaceBuildException e) {
  +        } catch (NotAPublicInterfaceBuildException e) {
               expected = e;
           }
           assertEquals(fullyQualifiedInterfaceName, expected.getInterfaceName());
       }
  +*/
   
  -    public void testCanGenerateCorrectMetadata() throws IOException, ParserConfigurationException, SAXException {
  +    public void testCanGenerateCorrectMetadataForOneInterface() throws IOException, ParserConfigurationException, SAXException {
           createJavaSourceFile(sourceDirectory, new Interface(
                   packageName,
                   interfaceName,
  @@ -214,8 +216,7 @@
           assertEquals(firstLineOfJavadoc, interfaceMetadata.getShortDescription());
       }
   
  -    //TODO
  -    public void todo_testCanGenerateCorrectMetadataForTwoInterfaces() throws IOException, ParserConfigurationException, SAXException {
  +    public void testCanGenerateCorrectMetadataForTwoInterfaces() throws IOException, ParserConfigurationException, SAXException {
           createJavaSourceFile(sourceDirectory, new Interface(
                   packageName,
                   interfaceName,
  @@ -225,7 +226,7 @@
           String firstLineOfJavadocForSecondInterface = "This is another first line.";
           String secondJavadoc = firstLineOfJavadocForSecondInterface + " " + someJavadoc;
           String secondFullyQualifiedInterfaceName = packageName + "." + secondInterfaceName;
  -        createJavaSourceFile(sourceDirectory, new Interface(
  +        createJavaSourceFile(sourceDirectory, new Javaclass(
                   packageName,
                   secondInterfaceName,
                   secondJavadoc,
  @@ -249,7 +250,6 @@
           assertEquals(secondFullyQualifiedInterfaceName, interfaceMetadata.getFullyQualifiedName());
           assertEquals(secondJavadoc,interfaceMetadata.getJavadoc());
           assertEquals(firstLineOfJavadocForSecondInterface, interfaceMetadata.getShortDescription());
  -
       }
   
       private void createJavaSourceFile(String targetDirectory, JavaSourceFile javaSourceFile, final Collection collectingParameter) throws IOException {
  
  
  


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/