|
From: <de...@us...> - 2012-11-22 07:56:14
|
Revision: 8063
http://fudaa.svn.sourceforge.net/fudaa/?rev=8063&view=rev
Author: deniger
Date: 2012-11-22 07:56:08 +0000 (Thu, 22 Nov 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-mascaret/server/src/test/java/org/fudaa/dodico/mascaret/CompleteStructureTest.java
Modified: trunk/soft/fudaa-mascaret/server/src/test/java/org/fudaa/dodico/mascaret/CompleteStructureTest.java
===================================================================
--- trunk/soft/fudaa-mascaret/server/src/test/java/org/fudaa/dodico/mascaret/CompleteStructureTest.java 2012-11-21 14:28:20 UTC (rev 8062)
+++ trunk/soft/fudaa-mascaret/server/src/test/java/org/fudaa/dodico/mascaret/CompleteStructureTest.java 2012-11-22 07:56:08 UTC (rev 8063)
@@ -15,7 +15,7 @@
* @author Frederic Deniger
*/
public class CompleteStructureTest extends AbstractMascaretTestCase {
-
+
private static void createFile(SParametresCAS parametresCas, File target) {
EdamoxXmlReaderWriter xmlWriter = new EdamoxXmlReaderWriter("1.0");
EdamoxXMLContent content = new EdamoxXMLContent(parametresCas);
@@ -39,7 +39,13 @@
}
return newInstance;
}
-
+
+ /**
+ *
+ * @param in the class to instanciate. Call #instanciate(Class) for complex objects.
+ * @return
+ * @throws Exception
+ */
private static Object doInstanciation(Class in) throws Exception {
if (Boolean.TYPE.equals(in)) {
return true;
@@ -86,7 +92,12 @@
}
return instanciate(in);
}
-
+
+ /**
+ * Write a file containing all paramaters of a study file. Then read it and test that the result is the same than the initial data.
+ *
+ * @throws Exception
+ */
public void testValidate() throws Exception {
File tempFile = createTempFile(".xml");
SParametresCAS res = (SParametresCAS) instanciate(SParametresCAS.class);
@@ -101,10 +112,17 @@
assertNotNull(readContent.getParametresCas());
EdamoxXmlReaderWriterTest.testCompare(res, readContent.getParametresCas());
}
-
+
+ /**
+ * Just to check the content of the file.
+ * //WARN the absolute path must be change.
+ * @param args
+ * @throws Exception
+ */
public static void main(String[] args) throws Exception {
//to be modified: create a xml file in a hardcoded file.
SParametresCAS res = (SParametresCAS) instanciate(SParametresCAS.class);
+
createFile(res, new File("C:\\data\\tmp\\toto.xml"));
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|