Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
145 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.hyperic.hq.hqapi1.test; | ||
|
||
import org.hyperic.hq.hqapi1.wadl.*; | ||
|
||
public class WADLAgent_test extends WADLTestBase { | ||
|
||
public void testAgent() throws Exception { | ||
|
||
Endpoint.AgentGetHqu agentGet = new Endpoint.AgentGetHqu(); | ||
Endpoint.AgentListHqu agentList = new Endpoint.AgentListHqu(); | ||
Endpoint.AgentPingHqu agentPing = new Endpoint.AgentPingHqu(); | ||
|
||
AgentsResponse agents = agentList.getAsAgentsResponse(); | ||
hqAssertSuccess(agents); | ||
assertTrue("No agents found!", agents.getAgent().size() > 0); | ||
|
||
Agent a = agents.getAgent().get(0); | ||
AgentResponse agent = agentGet.getAsAgentResponse(a.getId()); | ||
hqAssertSuccess(agent); | ||
|
||
PingAgentResponse ping = agentPing.getAsPingAgentResponse(a.getId()); | ||
hqAssertSuccess(ping); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/org/hyperic/hq/hqapi1/test/WADLAutodiscovery_test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.hyperic.hq.hqapi1.test; | ||
|
||
import org.hyperic.hq.hqapi1.wadl.*; | ||
|
||
public class WADLAutodiscovery_test extends WADLTestBase { | ||
|
||
public void testGetQueue() throws Exception { | ||
|
||
Endpoint.AutodiscoveryGetQueueHqu adGetQueue = | ||
new Endpoint.AutodiscoveryGetQueueHqu(); | ||
|
||
QueueResponse queue = adGetQueue.getAsQueueResponse(); | ||
hqAssertSuccess(queue); | ||
} | ||
|
||
public void testApprove() throws Exception { | ||
|
||
Endpoint.AutodiscoveryApproveHqu adApprove = | ||
new Endpoint.AutodiscoveryApproveHqu(); | ||
|
||
StatusResponse approve = adApprove.getAsStatusResponse(Integer.MAX_VALUE); | ||
hqAssertFailure(approve); // That id won't exist, just testing endpoints. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters