use of com.aliyuncs.fc.request.GetTriggerRequest in project fc-java-sdk by aliyun.
the class FunctionComputeClientTest method testGetTriggerValidate.
@Test
public void testGetTriggerValidate() {
try {
GetTriggerRequest request = new GetTriggerRequest(SERVICE_NAME, FUNCTION_NAME, null);
client.getTrigger(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
try {
GetTriggerRequest request = new GetTriggerRequest(SERVICE_NAME, FUNCTION_NAME, "");
client.getTrigger(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
try {
GetTriggerRequest request = new GetTriggerRequest(SERVICE_NAME, null, TRIGGER_NAME);
client.getTrigger(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
try {
GetTriggerRequest request = new GetTriggerRequest(SERVICE_NAME, "", TRIGGER_NAME);
client.getTrigger(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
try {
GetTriggerRequest request = new GetTriggerRequest(null, FUNCTION_NAME, TRIGGER_NAME);
client.getTrigger(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
try {
GetTriggerRequest request = new GetTriggerRequest("", FUNCTION_NAME, TRIGGER_NAME);
client.getTrigger(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
}
Aggregations