Author: krishantha
Date: Mon Jan 14 02:31:27 2008
New Revision: 12209
Log:
Added:
trunk/registry/modules/core/src/test/java/org/wso2/registry/qa/
trunk/registry/modules/core/src/test/java/org/wso2/registry/qa/UserTest.java
Added:
trunk/registry/modules/core/src/test/java/org/wso2/registry/qa/UserTest.java
==============================================================================
--- (empty file)
+++
trunk/registry/modules/core/src/test/java/org/wso2/registry/qa/UserTest.java
Mon Jan 14 02:31:27 2008
@@ -0,0 +1,77 @@
+package org.wso2.registry.qa;
+
+import junit.framework.TestCase;
+import org.wso2.registry.Registry;
+import org.wso2.registry.RegistryException;
+import org.wso2.registry.Resource;
+import org.wso2.registry.app.RemoteRegistry;
+
+import java.net.URL;
+
+/**
+ * Created by IntelliJ IDEA.
c
+ * User: krishantha
+ * Date: Jan 11, 2008
+ * Time: 8:46:10 AM
+ * To change this template use File | Settings | File Templates.
+ */
+
+
+public class UserTest extends TestCase {
+
+ private static Registry registry = null;
+
+ public void testAddResouces1() throws Exception{
+ registry = new RemoteRegistry(new
URL("http://localhost:8080/wso2registry/atom"), "admin" ,"admin");
+
+ Resource r1=new Resource();
+ String content="this is my content11";
+ r1.setContent(content.getBytes());
+
+ String path="/d1/d2/d3/r1";
+
+ try{
+ registry.put(path,r1);
+ r1 = registry.get("/d1/d2");
+// assertNotNull(r1.getLastUpdaterUserName());
+ }catch(RegistryException e) {
+ fail("Couldn't put content to path /c1/r7");
+ }
+
+ }
+
+ public void testDeleteResources() throws Exception{
+ registry = new RemoteRegistry(new
URL("http://localhost:8080/wso2registry/atom"), "admin" ,"admin");
+
+ Resource r1=new Resource();
+
+ String path="/c1/r7";
+
+ try{
+ registry.delete(path);
+
+ }catch(RegistryException e) {
+ fail("Couldn't delete content details from path /c1/r7");
+ }
+ }
+
+ public void testAddResouces2() throws Exception{
+ registry = new RemoteRegistry(new
URL("http://localhost:8080/wso2registry/atom"), "admin" ,"admin");
+
+ Resource r1=new Resource();
+ String content="this is my content2";
+ r1.setContent(content.getBytes());
+
+ String path="/c1/r7";
+
+ try{
+ registry.put(path,r1);
+ }catch(RegistryException e) {
+ fail("Couldn't put content to path /c1/r7");
+ }
+
+ }
+
+}
+
+
_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev