use of com.aliyuncs.fc.exceptions.ClientException in project fc-java-sdk by aliyun.
the class FunctionComputeClientTest method testListTriggersValidate.
@Test
public void testListTriggersValidate() {
try {
ListTriggersRequest request = new ListTriggersRequest(null, FUNCTION_NAME);
client.listTriggers(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
try {
ListTriggersRequest request = new ListTriggersRequest("", FUNCTION_NAME);
client.listTriggers(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
try {
ListTriggersRequest request = new ListTriggersRequest(SERVICE_NAME, null);
client.listTriggers(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
try {
ListTriggersRequest request = new ListTriggersRequest(SERVICE_NAME, "");
client.listTriggers(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
}
use of com.aliyuncs.fc.exceptions.ClientException in project fc-java-sdk by aliyun.
the class FunctionComputeClientTest method testInvokeFunctionValidate.
@Test
public void testInvokeFunctionValidate() {
try {
InvokeFunctionRequest request = new InvokeFunctionRequest(SERVICE_NAME, null);
client.invokeFunction(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
try {
InvokeFunctionRequest request = new InvokeFunctionRequest(SERVICE_NAME, "");
client.invokeFunction(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
try {
InvokeFunctionRequest request = new InvokeFunctionRequest("", FUNCTION_NAME);
client.invokeFunction(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
try {
InvokeFunctionRequest request = new InvokeFunctionRequest(null, FUNCTION_NAME);
client.invokeFunction(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
}
use of com.aliyuncs.fc.exceptions.ClientException in project fc-java-sdk by aliyun.
the class FunctionComputeClientTest method testGetFunctionValidate.
@Test
public void testGetFunctionValidate() {
try {
GetFunctionRequest request = new GetFunctionRequest(SERVICE_NAME, null);
client.getFunction(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
try {
GetFunctionRequest request = new GetFunctionRequest(SERVICE_NAME, "");
client.getFunction(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
try {
GetFunctionRequest request = new GetFunctionRequest(null, FUNCTION_NAME);
client.getFunction(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
try {
GetFunctionRequest request = new GetFunctionRequest("", FUNCTION_NAME);
client.getFunction(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
}
use of com.aliyuncs.fc.exceptions.ClientException in project fc-java-sdk by aliyun.
the class FunctionComputeClientTest method testGetServiceValidate.
@Test
public void testGetServiceValidate() {
try {
GetServiceRequest request = new GetServiceRequest(null);
client.getService(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
try {
GetServiceRequest request = new GetServiceRequest("");
client.getService(request);
fail("ClientException is expected");
} catch (ClientException e) {
assertTrue(e.getMessage().contains(VALIDATE_MSG));
}
}
use of com.aliyuncs.fc.exceptions.ClientException 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