avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oberh...@apache.org
Subject svn commit: rev 43351 - in avalon/trunk/central/laboratory/studio/eclipse/test: . core/org/apache/metro/studio/eclipse/core/templateengine/test
Date Sat, 04 Sep 2004 20:08:10 GMT
Author: oberhack
Date: Sat Sep  4 13:08:09 2004
New Revision: 43351

Modified:
   avalon/trunk/central/laboratory/studio/eclipse/test/core/org/apache/metro/studio/eclipse/core/templateengine/test/DirectoryTemplateManagerTest.java
   avalon/trunk/central/laboratory/studio/eclipse/test/core/org/apache/metro/studio/eclipse/core/templateengine/test/ResourceTemplateManagerTest.java
   avalon/trunk/central/laboratory/studio/eclipse/test/plugin.xml
Log:


Modified: avalon/trunk/central/laboratory/studio/eclipse/test/core/org/apache/metro/studio/eclipse/core/templateengine/test/DirectoryTemplateManagerTest.java
==============================================================================
--- avalon/trunk/central/laboratory/studio/eclipse/test/core/org/apache/metro/studio/eclipse/core/templateengine/test/DirectoryTemplateManagerTest.java
(original)
+++ avalon/trunk/central/laboratory/studio/eclipse/test/core/org/apache/metro/studio/eclipse/core/templateengine/test/DirectoryTemplateManagerTest.java
Sat Sep  4 13:08:09 2004
@@ -19,9 +19,6 @@
 package org.apache.metro.studio.eclipse.core.templateengine.test;
 
 import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.Writer;
 import java.util.Vector;
 
 import junit.framework.TestCase;
@@ -38,8 +35,6 @@
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 
-import com.thoughtworks.xstream.XStream;
-
 /**
  * @author <a href="mailto:dev@avalon.apache.org">Metro Development Team</a>
  * 11.08.2004
@@ -62,22 +57,13 @@
      */
     public final void testCreateLoadConfigFile()
     {
-        XStream xstream = new XStream();
-        DirectoryTemplateManager.initXStream(xstream);
+        DirectoryTemplateManager.initXStream();
         DirectoryTemplateManager m = new DirectoryTemplateManager();
         
         m.addDirectoryTemplate(createStandardBlock());        
         m.addDirectoryTemplate(createImplApiBlock()); 
         
-        try
-        {
-            Writer out = new FileWriter(configFileLocation);
-            xstream.toXML(m, out);
-        } catch (IOException e)
-        {
-            fail("unable to write config file");
-        }
-        
+        m.store(configFileLocation);
         m = DirectoryTemplateManager.load(configFileLocation);
         
         assertNotNull("Could not reload xml file", m);

Modified: avalon/trunk/central/laboratory/studio/eclipse/test/core/org/apache/metro/studio/eclipse/core/templateengine/test/ResourceTemplateManagerTest.java
==============================================================================
--- avalon/trunk/central/laboratory/studio/eclipse/test/core/org/apache/metro/studio/eclipse/core/templateengine/test/ResourceTemplateManagerTest.java
(original)
+++ avalon/trunk/central/laboratory/studio/eclipse/test/core/org/apache/metro/studio/eclipse/core/templateengine/test/ResourceTemplateManagerTest.java
Sat Sep  4 13:08:09 2004
@@ -18,9 +18,6 @@
 package org.apache.metro.studio.eclipse.core.templateengine.test;
 
 import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.Writer;
 
 import junit.framework.TestCase;
 
@@ -33,9 +30,6 @@
 import org.apache.metro.studio.eclipse.core.templateengine.ResourceTemplateManager;
 import org.eclipse.core.resources.IProject;
 
-import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.io.xml.DomDriver;
-
 /**
  * @author <a href="mailto:dev@avalon.apache.org">Metro Development Team </a>
  *         12.08.2004 last change:
@@ -59,15 +53,13 @@
 
     public final void testCreateResourceTemplate()
     {
-        XStream xstream = new XStream(new DomDriver());
-        ResourceTemplateManager.initXStream(xstream);
+        ResourceTemplateManager.initXStream();
         ResourceTemplateManager rm = new ResourceTemplateManager();
 
         // import DirectoryTemplates, which are created in
         // DirectoryTemplatemanagerTest
         DirectoryTemplateManager dm = DirectoryTemplateManager
                 .load(directoryLocation);
-        dm.addXStreamAliases(xstream);
         rm.importDirectoryTemplates(dm);
 
         rm.addResourceTemplate(createHelloWorldResources());
@@ -81,15 +73,9 @@
         rm.addResourceTemplate(createPlusContextResources());
         rm.addResourceTemplate(createStrategyContextResources());
         */
-        try
-        {
-            Writer out = new FileWriter(resourcesLocation);
-            xstream.toXML(rm, out);
-        } catch (IOException e)
-        {
-            fail("unable to write config file");
-        }
 
+        rm.store(resourcesLocation);
+        
         rm = ResourceTemplateManager.load(resourcesLocation);
 
         assertNotNull("Could not reload xml file", rm);

Modified: avalon/trunk/central/laboratory/studio/eclipse/test/plugin.xml
==============================================================================
--- avalon/trunk/central/laboratory/studio/eclipse/test/plugin.xml	(original)
+++ avalon/trunk/central/laboratory/studio/eclipse/test/plugin.xml	Sat Sep  4 13:08:09 2004
@@ -11,12 +11,7 @@
       <library name="MetroStudioTests.jar">
          <export name="*"/>
       </library>
-      <library name="lib/xstream-1.0.2.jar">
-         <export name="*"/>
-      </library>
-      <library name="lib/metro-event-0.0.1.jar">
-         <export name="*"/>
-      </library>
+      <library name="lib/metro-event-0.0.1.jar"/>
    </runtime>
 
    <requires>

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message