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