- Timestamp:
- 01/26/16 15:16:55 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
metadata/trunk/toolkit/src/test/java/eu/clarin/cmd/toolkit/TestCMDToolkit.java
r6925 r6926 197 197 @Test 198 198 public void testAdelheid() throws Exception { 199 System.out.println("* BEGIN: Adelheid tests (valid)"); 200 199 201 String profile = "/toolkit/Adelheid/profiles/clarin.eu:cr1:p_1311927752306.xml"; 200 202 String record = "/toolkit/Adelheid/records/Adelheid.cmdi"; 201 203 202 204 // upgrade the profile from 1.1 to 1.2 205 System.out.println("- upgrade profile from 1.1 to 1.2"); 203 206 Document upgradedProfile = upgradeCMDSpec(profile); 204 207 … … 217 220 218 221 // upgrade the record from 1.1 to 1.2 222 System.out.println("- upgrade record from 1.1 to 1.2"); 219 223 Document upgradedRecord = upgradeCMDRecord(record,upgradedProfile); 220 224 … … 229 233 230 234 // downgrade the 1.2 profile to 1.1 235 System.out.println("- downgrade profile from 1.2 to 1.1"); 231 236 Document oldProfile = downgradeCMDSpec(profile+" (upgraded)",new DOMSource(upgradedProfile)); 232 237 … … 239 244 // so there should be no errors 240 245 assertEquals(0, countErrors(validateCMDoldSpec)); 246 247 System.out.println("* END : Adelheid tests"); 241 248 } 242 249 243 250 @Test 244 251 public void testAdelheid2() throws Exception { 252 System.out.println("* BEGIN: Adelheid 2 tests (invalid)"); 253 245 254 String profile = "/toolkit/Adelheid/profiles/clarin.eu:cr1:p_1311927752306_1_2.xml"; 246 255 String record = "/toolkit/Adelheid/records/Adelheid_1_2-invalid.cmdi"; … … 275 284 assertTrue(validOldProfile); 276 285 // so there should be no errors 277 assertEquals(0, countErrors(validateCMDoldSpec)); 286 assertEquals(0, countErrors(validateCMDoldSpec)); 287 288 System.out.println("* END : Adelheid 2 tests"); 278 289 } 279 290 280 291 @Test 281 292 public void testSundhed() throws Exception { 293 System.out.println("* BEGIN: Sundhed tests (valid)"); 294 282 295 String profile = "/toolkit/TEI/profiles/clarin.eu:cr1:p_1380106710826.xml"; 283 296 String record = "/toolkit/TEI/records/sundhed_dsn.teiHeader.ref.xml"; … … 323 336 // so there should be no errors 324 337 assertEquals(0, countErrors(validateCMDoldSpec)); 338 339 System.out.println("* END : Sundhed tests"); 325 340 } 326 341 327 342 @Test 328 343 public void testTEI() throws Exception { 344 System.out.println("* BEGIN: TEI tests (valid)"); 345 329 346 String profile = "/toolkit/TEI/profiles/clarin.eu:cr1:p_1380106710826.xml"; 330 347 String record = "/toolkit/TEI/records/sundhed_dsn.teiHeader.ref.xml"; … … 339 356 // the @ref attributes on the elements should stay as they are 340 357 assertTrue(xpath(upgradedRecord,"//*:author/*:name/@ref")); 358 359 System.out.println("* END : TEI tests"); 341 360 } 342 361 343 362 @Test 344 363 public void testSuccessor() throws Exception { 364 System.out.println("* BEGIN: successor tests (valid+invalid)"); 365 345 366 String validRecord = "/toolkit/successor/profiles/successor-valid.xml"; 346 367 String invalidRecord = "/toolkit/successor/profiles/successor-invalid.xml"; … … 349 370 assertTrue(validateCMDSpec(validRecord)); 350 371 assertFalse(validateCMDSpec(invalidRecord)); 372 373 System.out.println("* END : successor tests"); 351 374 } 352 375 353 376 @Test 354 377 public void testOLAC() throws Exception { 378 System.out.println("* BEGIN: OLAC tests (invalid)"); 379 355 380 String profile = "/toolkit/OLAC/profiles/OLAC-DcmiTerms.xml"; 356 381 String record = "/toolkit/OLAC/records/org_rosettaproject-record.xml"; … … 391 416 assertTrue(validOldProfile); 392 417 // so there should be no errors 393 assertEquals(0, countErrors(validateCMDoldSpec)); 418 assertEquals(0, countErrors(validateCMDoldSpec)); 419 420 System.out.println("* END : OLAC tests"); 394 421 } 395 422 396 423 @Test 397 424 public void testCMD() throws Exception { 425 System.out.println("* BEGIN: CMD tests (invalid)"); 426 398 427 String profile = "/toolkit/CMD/profiles/components-invalid.xml"; 399 428 … … 403 432 // assertions 404 433 assertFalse(validProfile); 434 435 System.out.println("* END : CMD tests"); 405 436 } 406 437
Note: See TracChangeset
for help on using the changeset viewer.