Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge branch 'wadl'
- Loading branch information
Showing
4 changed files
with
365 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.hyperic.hq.hqapi1.test; | ||
|
||
import org.hyperic.hq.hqapi1.wadl.*; | ||
|
||
public class WADLEscalation_test extends WADLTestBase { | ||
|
||
public void testEscalationGet() throws Exception { | ||
Endpoint.EscalationGetHqu escGet = new Endpoint.EscalationGetHqu(); | ||
|
||
EscalationResponse response = escGet.getAsEscalationResponse("Some Esc"); | ||
hqAssertFailure(response); // Won't exist | ||
} | ||
|
||
public void testEscalationList() throws Exception { | ||
Endpoint.EscalationListHqu escList = new Endpoint.EscalationListHqu(); | ||
|
||
EscalationsResponse response = escList.getAsEscalationsResponse(); | ||
hqAssertSuccess(response); | ||
} | ||
|
||
public void testEscalationDelete() throws Exception { | ||
Endpoint.EscalationDeleteHqu escDelete = | ||
new Endpoint.EscalationDeleteHqu(); | ||
|
||
StatusResponse response = escDelete.getAsStatusResponse(Integer.MAX_VALUE); | ||
hqAssertFailure(response); // Won't exist | ||
} | ||
|
||
public void testEscalationSync() throws Exception { | ||
Endpoint.EscalationSyncHqu escSync = | ||
new Endpoint.EscalationSyncHqu(); | ||
|
||
EscalationsRequest request = new EscalationsRequest(); | ||
|
||
StatusResponse response = escSync.postAsStatusResponse(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.hyperic.hq.hqapi1.test; | ||
|
||
import org.hyperic.hq.hqapi1.wadl.*; | ||
|
||
public class WADLMaintenance_test extends WADLTestBase { | ||
|
||
public void testGet() throws Exception { | ||
Endpoint.MaintenanceGetHqu maintGet = new Endpoint.MaintenanceGetHqu(); | ||
|
||
MaintenanceResponse response = maintGet.getAsMaintenanceResponse(Integer.MAX_VALUE); | ||
hqAssertFailure(response); | ||
} | ||
|
||
public void testSchedule() throws Exception { | ||
Endpoint.MaintenanceScheduleHqu maintSchedule = | ||
new Endpoint.MaintenanceScheduleHqu(); | ||
|
||
MaintenanceResponse response = | ||
maintSchedule.getAsMaintenanceResponse(Integer.MAX_VALUE, | ||
System.currentTimeMillis(), | ||
System.currentTimeMillis()); | ||
hqAssertFailure(response); | ||
} | ||
|
||
public void testUnschedule() throws Exception { | ||
Endpoint.MaintenanceUnscheduleHqu maintUnschedule = | ||
new Endpoint.MaintenanceUnscheduleHqu(); | ||
|
||
StatusResponse response = | ||
maintUnschedule.getAsStatusResponse(Integer.MAX_VALUE); | ||
hqAssertFailure(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