Changeset 2184
- Timestamp:
- 08/30/12 15:42:11 (12 years ago)
- Location:
- ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/test
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/CMDComponentTypeWrapperTest.java
r2174 r2184 214 214 215 215 // adds dummy filenames to the content of largeProfile.XML 216 private CMDComponentSpec makeTest SpecFromLargeProfile() throws IOException, JAXBException {217 218 String largeprofilestring = RegistryTestHelper.get LargeProfileContent(); // reading from the file216 private CMDComponentSpec makeTestFromFile(String filename) throws IOException, JAXBException { 217 218 String largeprofilestring = RegistryTestHelper.getProfileContentFromFile(filename); 219 219 CMDComponentSpec compspec=RegistryTestHelper.getComponentFromString(largeprofilestring); // calling unmarchaller 220 220 … … 251 251 252 252 // creating the profile with filenames filled by "Dummy" and writing it into the file 253 public void writeDummiedXML() throws IOException, JAXBException{ 254 255 CMDComponentSpec compspec=makeTestSpecFromLargeProfile(); 256 writeSpecToFile(compspec, "src/test/resources/xml/largeProfileDummyFilenames.xml"); 257 253 public void writeDummiedXML(String filenamein, String filenameout) throws IOException, JAXBException{ 254 255 CMDComponentSpec compspec=makeTestFromFile(filenamein); 256 writeSpecToFile(compspec, filenameout); 258 257 } 259 258 … … 265 264 @Test 266 265 267 public void setFileNamesToNullTestFile() throws IOException, JAXBException { 268 269 writeDummiedXML(); 266 public void setFileNamesToNullTestFile1() throws IOException, JAXBException { 267 268 writeDummiedXML("/xml/largeProfile.xml", "src/test/resources/xml/largeProfileDummyFilenames.xml"); 269 270 270 271 271 String dummiedcontent = RegistryTestHelper.getProfileContentFromFile("/xml/largeProfileDummyFilenames.xml"); … … 282 282 283 283 } 284 285 286 287 } 288 289 290 291 292 284 //////////////////////////////////// 285 286 @Test 287 288 public void setFileNamesToNullTestFile2() throws IOException, JAXBException { 289 290 writeDummiedXML("/xml/A.xml", "src/test/resources/xml/ADummyFilenames.xml"); 291 292 293 String dummiedcontent= RegistryTestHelper.getProfileContentFromFile("/xml/ADummyFilenames.xml"); 294 assertTrue(dummiedcontent != null); 295 CMDComponentSpec newcompspec = RegistryTestHelper.getComponentFromString(dummiedcontent); // calling unmarchaller 296 assertTrue(newcompspec != null); 297 298 CMDComponentTypeWrapper wrapper = new CMDComponentTypeWrapper(newcompspec); 299 300 wrapper.setFileNamesToNull(); 301 302 checkNullnessOfFilenamesInListOfComponents(newcompspec.getCMDComponent()); 303 writeSpecToFile(newcompspec, "src/test/resources/xml/AUndummied.xml"); 304 305 306 } 307 308 } 309 310 311 312 313 -
ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/test/resources/xml/Component1.xml
r2174 r2184 1 1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 2 2 <componentDescription xmlns:ns2="http://www.w3.org/1999/xlink"> 3 <id>clarin.eu:cr1:c_1346 252981279</id>3 <id>clarin.eu:cr1:c_1346315576463</id> 4 4 <description>description1dum</description> 5 5 <name>name1dum</name> 6 <registrationDate>2012-08- 29T15:12:50+00:00</registrationDate>6 <registrationDate>2012-08-30T08:36:02+00:00</registrationDate> 7 7 <creatorName>God</creatorName> 8 8 <userId>uid1dum</userId> -
ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/test/resources/xml/Component2.xml
r2174 r2184 1 1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 2 2 <componentDescription xmlns:ns2="http://www.w3.org/1999/xlink"> 3 <id>clarin.eu:cr1:c_1346 252981280</id>3 <id>clarin.eu:cr1:c_1346315576464</id> 4 4 <description>description2dum</description> 5 5 <name>name2dum</name> 6 <registrationDate>2012-08- 29T15:12:50+00:00</registrationDate>6 <registrationDate>2012-08-30T08:36:02+00:00</registrationDate> 7 7 <creatorName>Allah</creatorName> 8 8 <userId>uid2dum</userId> -
ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/test/resources/xml/rssTest.xml
r2174 r2184 1 ,<?xml version="1.0" encoding="UTF-8" standalone="yes"?>1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 2 2 <rss> 3 3 <channel> … … 7 7 <link>href1dum</link> 8 8 <author>God</author> 9 <pubDate>2012-08-29T15: 05:08+00:00</pubDate>9 <pubDate>2012-08-29T15:12:50+00:00</pubDate> 10 10 </item> 11 11 <item> … … 14 14 <link>href2dum</link> 15 15 <author>Allah</author> 16 <pubDate>2012-08-29T15: 05:08+00:00</pubDate>16 <pubDate>2012-08-29T15:12:50+00:00</pubDate> 17 17 </item> 18 18 </channel>
Note: See TracChangeset
for help on using the changeset viewer.