Re: [Dev] Is there any method which can checks the resource exists or not in registry

2015-10-07 Thread Rajeenthini Satkunam
Hi, @kasun @rajith @denuwanthi @isuruwan Thanks you for your prompt reply.I have tried the way which isuruwan mentiond above.It is working fine now. On Wed, Oct 7, 2015 at 11:52 AM, Isuruwan Herath wrote: > Also if you're using ResourceAdminServiceClient, this [1] is an

Re: [Dev] Is there any method which can checks the resource exists or not in registry

2015-10-07 Thread Isuruwan Herath
Also if you're using ResourceAdminServiceClient, this [1] is an example how resource exists is checked in G-Reg tests. [1]

Re: [Dev] Is there any method which can checks the resource exists or not in registry

2015-10-07 Thread Denuwanthi De Silva
Hi Rajeenthini, You need to pass an 'AutomationContext' object to 'getWSRegistry' method. Can you verify the method 'getUesContext' returns a proper AutomationContext? Ex of defining an automation context fro greg product AutomationContext context = new AutomationContext("GREG",

[Dev] Is there any method which can checks the resource exists or not in registry

2015-10-06 Thread Rajeenthini Satkunam
Hi all, I am writing UI test cases for UES/Dashboard Server(DS).I have tried to write a test class for adding and deleting dashboard for the Dashboard Server.Here I need to check the resource is existing or not at the registry.You can have a look for the class[1] I have wrote for adding and

Re: [Dev] Is there any method which can checks the resource exists or not in registry

2015-10-06 Thread Kasun Bandara
Hi Rajeenthini, You can invoke the *boolean resourceExists(String resorcePath)* method through the Registry class comes with registry core. Returns true if the resource exists in the specified path & returns false if it's not reside in the path. Thanks and Regards. On Tue, Oct 6, 2015 at 3:42

Re: [Dev] Is there any method which can checks the resource exists or not in registry

2015-10-06 Thread Rajith Roshan
Hi Rajeenthini, You can get the instance of registry as below and check if the resource exists. RegistryProviderUtil provider = new RegistryProviderUtil(); WSRegistryServiceClient registry = provider.getWSRegistry(automationContext); if(registry.resourceExists(path)) Thanks, Rajith On Tue,

Re: [Dev] Is there any method which can checks the resource exists or not in registry

2015-10-06 Thread Rajeenthini Satkunam
Hi rajith, I have tried the way you mentioned.When I use like this RegistryProviderUtil provider = new RegistryProviderUtil(); WSRegistryServiceClient registry = provider.getWSRegistry(getUesContext()); assertFalse(registry.resourceExists(resourcePath),"Registry resource could not be deleted due