You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by sc...@apache.org on 2012/03/01 14:13:11 UTC

svn commit: r1295551 - /incubator/wookie/trunk/src-tests/org/apache/wookie/tests/functional/WidgetsControllerTest.java

Author: scottbw
Date: Thu Mar  1 13:13:11 2012
New Revision: 1295551

URL: http://svn.apache.org/viewvc?rev=1295551&view=rev
Log:
Reuse the existing authentication setting method in superclass

Modified:
    incubator/wookie/trunk/src-tests/org/apache/wookie/tests/functional/WidgetsControllerTest.java

Modified: incubator/wookie/trunk/src-tests/org/apache/wookie/tests/functional/WidgetsControllerTest.java
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/src-tests/org/apache/wookie/tests/functional/WidgetsControllerTest.java?rev=1295551&r1=1295550&r2=1295551&view=diff
==============================================================================
--- incubator/wookie/trunk/src-tests/org/apache/wookie/tests/functional/WidgetsControllerTest.java (original)
+++ incubator/wookie/trunk/src-tests/org/apache/wookie/tests/functional/WidgetsControllerTest.java Thu Mar  1 13:13:11 2012
@@ -136,10 +136,8 @@ public class WidgetsControllerTest exten
     //
     // Use admin credentials
     //
-    client.getState().setCredentials(
-        new AuthScope("localhost", 8080, "wookie"),
-        new UsernamePasswordCredentials("java", "java")
-        );
+    setAuthenticationCredentials(client);
+    
     PostMethod post = new PostMethod(TEST_WIDGETS_SERVICE_URL_VALID);
     
     //
@@ -170,10 +168,7 @@ public class WidgetsControllerTest exten
 	  //
 	  // Use admin credentials
 	  //
-	  client.getState().setCredentials(
-	      new AuthScope("localhost", 8080, "wookie"),
-	      new UsernamePasswordCredentials("java", "java")
-	  );
+	  setAuthenticationCredentials(client);
 	  PostMethod post = new PostMethod(TEST_WIDGETS_SERVICE_URL_VALID);
 
 	  //
@@ -219,10 +214,7 @@ public class WidgetsControllerTest exten
     //
     // Use admin credentials
     //
-    client.getState().setCredentials(
-        new AuthScope("localhost", 8080, "wookie"),
-        new UsernamePasswordCredentials("java", "java")
-        );
+    setAuthenticationCredentials(client);
     DeleteMethod delete = new DeleteMethod(TEST_WIDGETS_SERVICE_URL_VALID + "/9999");
     client.executeMethod(delete);
     assertEquals(404, delete.getStatusCode());
@@ -234,12 +226,8 @@ public class WidgetsControllerTest exten
     //
     // Use admin credentials
     //
-    client.getState().setCredentials(
-        new AuthScope("localhost", 8080, "wookie"),
-        new UsernamePasswordCredentials("java", "java")
-        );
-    
-    
+    setAuthenticationCredentials(client);
+
     //
     // Upload widget we'll test deleting next
     //
@@ -287,10 +275,7 @@ public class WidgetsControllerTest exten
 	      //
 	      // Use admin credentials
 	      //
-	      client.getState().setCredentials(
-	          new AuthScope("localhost", 8080, "wookie"),
-	          new UsernamePasswordCredentials("java", "java")
-	      );
+	      setAuthenticationCredentials(client);
 	      
 	      PostMethod post = new PostMethod(TEST_WIDGETS_SERVICE_URL_VALID);