Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add WADL resource definitions for AlertDefinitionApi
- Loading branch information
Ryan Morgan
committed
Jun 26, 2009
1 parent
0541e5d
commit 14b061e
Showing
2 changed files
with
148 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
src/org/hyperic/hq/hqapi1/test/WADLAlertDefinition_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,39 @@ | ||
package org.hyperic.hq.hqapi1.test; | ||
|
||
import org.hyperic.hq.hqapi1.wadl.*; | ||
|
||
public class WADLAlertDefinition_test extends WADLTestBase { | ||
|
||
public void testListDefinitions() throws Exception { | ||
Endpoint.AlertdefinitionListDefinitionsHqu adList = | ||
new Endpoint.AlertdefinitionListDefinitionsHqu(); | ||
|
||
AlertDefinitionsResponse response = adList.getAsAlertDefinitionsResponse(); | ||
hqAssertSuccess(response); | ||
} | ||
|
||
public void testListTypeDefinitions() throws Exception { | ||
Endpoint.AlertdefinitionListTypeDefinitionsHqu adTypeList = | ||
new Endpoint.AlertdefinitionListTypeDefinitionsHqu(); | ||
|
||
AlertDefinitionsResponse response = adTypeList.getAsAlertDefinitionsResponse(); | ||
hqAssertSuccess(response); | ||
} | ||
|
||
public void testDelete() throws Exception { | ||
Endpoint.AlertdefinitionDeleteHqu adDelete = | ||
new Endpoint.AlertdefinitionDeleteHqu(); | ||
|
||
StatusResponse response = adDelete.getAsStatusResponse(Integer.MAX_VALUE); | ||
hqAssertFailure(response); // Won't exist. | ||
} | ||
|
||
public void testSync() throws Exception { | ||
Endpoint.AlertdefinitionSyncHqu adSync = | ||
new Endpoint.AlertdefinitionSyncHqu(); | ||
AlertDefinitionsRequest request = new AlertDefinitionsRequest(); | ||
|
||
AlertDefinitionsResponse response = adSync.postAsAlertDefinitionsResponse(request); | ||
hqAssertSuccess(response); | ||
} | ||
} |
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