@Test
@Ignore //TODO {porcelli} have no idea why weld can't start container =/
public void testCopyAndRenameAndDelete() throws Exception {
final Bean drlTextEditorServiceBean = (Bean) beanManager.getBeans( DRLTextEditorService.class ).iterator().next();
final CreationalContext cc = beanManager.createCreationalContext( drlTextEditorServiceBean );
final DRLTextEditorService drlTextEditorService = (DRLTextEditorService) beanManager.getReference( drlTextEditorServiceBean,
DRLTextEditorService.class, cc );
//Copy
drlTextEditorService.copy( makePath( "/ProjectStructureValid/src/main/resources/org/kie/test/rule1.drl" ), "copiedFromRule1.drl", "copied" );
URL testUrl = this.getClass().getResource( "/ProjectStructureValid/src/main/resources/org/kie/test/copiedFromRule1.drl" );
assertNotNull( testUrl );
//Rename
drlTextEditorService.rename( makePath( "/ProjectStructureValid/src/main/resources/org/kie/test/copiedFromRule1.drl" ), "renamedFromRule1.drl", "renamed" );
testUrl = this.getClass().getResource( "/ProjectStructureValid/src/main/resources/org/kie/test/renamedFromRule1.drl" );
assertNotNull( testUrl );
//Delete
drlTextEditorService.delete( makePath( "/ProjectStructureValid/src/main/resources/org/kie/test/renamedFromRule1.drl" ), "deleted" );
testUrl = this.getClass().getResource( "/ProjectStructureValid/src/main/resources/org/kie/test/renamedFromRule1.drl" );
assertNull( testUrl );
}