Skip to content

Commit

Permalink
Rename WADL test base class.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Morgan committed Jun 24, 2009
1 parent c693558 commit 05b5c1d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/org/hyperic/hq/hqapi1/test/WADLTestBase.java
@@ -0,0 +1,30 @@
package org.hyperic.hq.hqapi1.test;

import junit.framework.TestCase;

import org.hyperic.hq.hqapi1.wadl.*;

import java.net.Authenticator;
import java.net.PasswordAuthentication;

public class WADLTestBase extends TestCase {

public void setUp() throws Exception {
final String username ="hqadmin";
final String password ="hqadmin";

Authenticator.setDefault(new Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication (username, password.toCharArray());
}
});
}

// Assert SUCCESS

void hqAssertSuccess(Response response) {
String error = (response.getError() != null) ?
response.getError().getReasonText() : "";
assertEquals(error, ResponseStatus.SUCCESS, response.getStatus());
}
}

0 comments on commit 05b5c1d

Please sign in to comment.