Search in sources :

Example 1 with DefaultApiError

use of com.nike.cerberus.error.DefaultApiError in project cerberus by Nike-Inc.

the class CustomApiErrorTest method test_creat_custom_api_error_works.

@Test
public void test_creat_custom_api_error_works() {
    DefaultApiError err = DefaultApiError.SDB_UNIQUE_NAME;
    ApiError error = CustomApiError.createCustomApiError(err, "message");
    String actual = error.getMessage();
    String expected = err.getMessage() + " " + "message";
    assertEquals(expected, actual);
}
Also used : DefaultApiError(com.nike.cerberus.error.DefaultApiError) ApiError(com.nike.backstopper.apierror.ApiError) DefaultApiError(com.nike.cerberus.error.DefaultApiError) Test(org.junit.Test)

Aggregations

ApiError (com.nike.backstopper.apierror.ApiError)1 DefaultApiError (com.nike.cerberus.error.DefaultApiError)1 Test (org.junit.Test)1