Skip to content

Commit

Permalink
Merge pull request wso2#6646 from rmsamitha/descriptive-errors
Browse files Browse the repository at this point in the history
Change test cases accordingly for PR wso2#6642
  • Loading branch information
rmsamitha authored Jun 28, 2024
2 parents 330c82b + 409fea0 commit 738a3f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ public enum ExceptionCodes implements ErrorHandler {

OPERATION_OR_RESOURCE_TYPE_OR_METHOD_NOT_DEFINED(902031,
"Operation type/http method is not specified for the operation/resource", 400,
"Operation type/http method is not specified for the operation/resource: %s"),
"Operation type/http method is not specified for the operation/resource: %s", false),

RESOURCE_URI_TEMPLATE_NOT_DEFINED(902032, "Resource URI template value not defined", 400,
"Resource URI template value (target) not defined", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private ApiTypeWrapper createMockAPIProduct() {
}

@Test
public void testValidateEndpointsDefaultType() {
public void testValidateEndpointsDefaultType() throws APIManagementException {

// endpointConfig
APIDTO apiDto = Mockito.mock(APIDTO.class);
Expand All @@ -150,7 +150,7 @@ public void testValidateEndpointsDefaultType() {
}

@Test
public void testValidateValidEndpoints() {
public void testValidateValidEndpoints() throws APIManagementException {

// endpointConfig
APIDTO apiDto = Mockito.mock(APIDTO.class);
Expand Down Expand Up @@ -181,7 +181,7 @@ public void testValidateValidEndpoints() {
}

@Test
public void testValidateInvalidProductionEndpoint() {
public void testValidateInvalidProductionEndpoint() throws APIManagementException {

// endpointConfig
APIDTO apiDto = Mockito.mock(APIDTO.class);
Expand Down Expand Up @@ -212,7 +212,7 @@ public void testValidateInvalidProductionEndpoint() {
}

@Test
public void testValidateInvalidSandboxEndpoint() {
public void testValidateInvalidSandboxEndpoint() throws APIManagementException {

// endpointConfig
APIDTO apiDto = Mockito.mock(APIDTO.class);
Expand Down Expand Up @@ -243,7 +243,7 @@ public void testValidateInvalidSandboxEndpoint() {
}

@Test
public void testValidateValidExternalEndpoints() {
public void testValidateValidExternalEndpoints() throws APIManagementException {

// endpointConfig
APIDTO apiDto = Mockito.mock(APIDTO.class);
Expand Down Expand Up @@ -284,7 +284,7 @@ public void testValidateValidExternalEndpoints() {
}

@Test
public void testValidateInvalidExternalEndpoints() {
public void testValidateInvalidExternalEndpoints() throws APIManagementException {

// endpointConfig
APIDTO apiDto = Mockito.mock(APIDTO.class);
Expand Down Expand Up @@ -325,7 +325,7 @@ public void testValidateInvalidExternalEndpoints() {
}

@Test
public void testValidateEndpointsNullEndpointConfig() {
public void testValidateEndpointsNullEndpointConfig() throws APIManagementException {

APIDTO apiDto = Mockito.mock(APIDTO.class);

Expand All @@ -347,7 +347,7 @@ public void testValidateEndpointsNullEndpointConfig() {
}

@Test
public void testValidateEndpointsNullAdvertiseInfo() {
public void testValidateEndpointsNullAdvertiseInfo() throws APIManagementException {

// endpointConfig
APIDTO apiDto = Mockito.mock(APIDTO.class);
Expand Down Expand Up @@ -375,7 +375,7 @@ public void testValidateEndpointsNullAdvertiseInfo() {
}

@Test
public void testValidateEndpointsNullExternalEndpoint() {
public void testValidateEndpointsNullExternalEndpoint() throws APIManagementException {

// endpointConfig
APIDTO apiDto = Mockito.mock(APIDTO.class);
Expand Down

0 comments on commit 738a3f8

Please sign in to comment.