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
6 changed files
with
90 additions
and
1 deletion.
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
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
29 changes: 29 additions & 0 deletions
29
src/org/hyperic/hq/hqapi1/test/AlertDefinitionGetByResource_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,29 @@ | ||
package org.hyperic.hq.hqapi1.test; | ||
|
||
import org.hyperic.hq.hqapi1.AlertDefinitionApi; | ||
import org.hyperic.hq.hqapi1.types.AlertDefinitionsResponse; | ||
import org.hyperic.hq.hqapi1.types.Resource; | ||
|
||
public class AlertDefinitionGetByResource_test extends AlertDefinitionTestBase { | ||
|
||
public AlertDefinitionGetByResource_test(String name) { | ||
super(name); | ||
} | ||
|
||
public void testGetByResource() throws Exception { | ||
AlertDefinitionApi api = getApi().getAlertDefinitionApi(); | ||
|
||
Resource localPlatform = getLocalPlatformResource(false, false); | ||
AlertDefinitionsResponse response = api.getAlertDefinitions(localPlatform); | ||
hqAssertSuccess(response); | ||
} | ||
|
||
public void testGetByInvalidResource() throws Exception { | ||
AlertDefinitionApi api = getApi().getAlertDefinitionApi(); | ||
|
||
Resource r = new Resource(); | ||
r.setId(Integer.MAX_VALUE); | ||
AlertDefinitionsResponse response = api.getAlertDefinitions(r); | ||
hqAssertFailureObjectNotFound(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
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