Changeset 666
- Timestamp:
- 09/06/10 07:25:50 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/trunk/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/ComponentRegistryImplTest.java
r622 r666 157 157 assertEquals(0, publicReg.getProfileDescriptions().size()); 158 158 159 userReg.deleteMDComponent(cDesc.getId(), USER_CREDS.getPrincipal() );159 userReg.deleteMDComponent(cDesc.getId(), USER_CREDS.getPrincipal(), false); 160 160 userReg.initCache(); 161 161 publicReg.initCache(); … … 165 165 assertEquals(0, publicReg.getProfileDescriptions().size()); 166 166 167 publicReg.deleteMDComponent(cDesc.getId(), USER_CREDS.getPrincipal() );167 publicReg.deleteMDComponent(cDesc.getId(), USER_CREDS.getPrincipal(), false); 168 168 userReg.deleteMDProfile(pDesc.getId(), USER_CREDS.getPrincipal()); 169 169 userReg.initCache(); … … 353 353 } catch (UserUnauthorizedException e) { 354 354 } 355 register.deleteMDComponent(description.getId(), new DummyPrincipal("Fake User") );355 register.deleteMDComponent(description.getId(), new DummyPrincipal("Fake User"), false); 356 356 357 357 assertEquals(1, register.getProfileDescriptions().size()); … … 376 376 registry.registerMDComponent(description, testComp); 377 377 try { 378 registry.deleteMDComponent(description.getId(), new DummyPrincipal("Fake User") );378 registry.deleteMDComponent(description.getId(), new DummyPrincipal("Fake User"), false); 379 379 fail("Should have thrown exception"); 380 380 } catch (UserUnauthorizedException e) { … … 384 384 assertNotNull(registry.getMDComponent(description.getId())); 385 385 386 registry.deleteMDComponent(description.getId(), USER_CREDS.getPrincipal() );386 registry.deleteMDComponent(description.getId(), USER_CREDS.getPrincipal(), false); 387 387 388 388 assertEquals(0, registry.getComponentDescriptions().size()); … … 406 406 registry.registerMDComponent(description, testComp); 407 407 try { 408 registry.deleteMDComponent(description.getId(), USER_CREDS.getPrincipal() );408 registry.deleteMDComponent(description.getId(), USER_CREDS.getPrincipal(), false); 409 409 fail("Should have thrown exception"); 410 410 } catch (DeleteFailedException e) { 411 411 } 412 412 assertEquals(1, registry.getComponentDescriptions().size()); 413 registry.deleteMDComponent(description.getId(), PRINCIPAL_ADMIN );413 registry.deleteMDComponent(description.getId(), PRINCIPAL_ADMIN, false); 414 414 assertEquals(0, registry.getComponentDescriptions().size()); 415 415 … … 417 417 registry.registerMDComponent(description, testComp); 418 418 assertEquals(1, registry.getComponentDescriptions().size()); 419 registry.deleteMDComponent(description.getId(), USER_CREDS.getPrincipal() ); //user workspace can always delete419 registry.deleteMDComponent(description.getId(), USER_CREDS.getPrincipal(), false); //user workspace can always delete 420 420 assertEquals(0, registry.getComponentDescriptions().size()); 421 421 } 422 423 //TODO PD make test for still in use component 422 424 423 425 @Test
Note: See TracChangeset
for help on using the changeset viewer.