BadRequestException.invalidSyntax(builder.toString()).getScimError();
/** * Tests the {@code fromString} method with an invalid path string. * * @param pathString The string representation of the path to fromString. * * @throws Exception If the test fails. */ @Test(dataProvider = "testInvalidPathStrings") public void testParseInvalidPath(final String pathString) throws Exception { try { Path.fromString(pathString); fail("Unexpected successful fromString of invalid path: " + pathString); } catch (BadRequestException e) { assertEquals(e.getScimError().getScimType(), BadRequestException.INVALID_PATH); } } }
/** * Tests the {@code fromString} method with an invalid filter string. * * @param filterString The string representation of the filter to * fromString. * * @throws Exception If the test fails. */ @Test(dataProvider = "testInvalidFilterStrings") public void testParseInvalidFilter(final String filterString) throws Exception { try { Filter.fromString(filterString); fail("Unexpected successful fromString of invalid filter: " + filterString); } catch (BadRequestException e) { assertEquals(e.getScimError().getScimType(), BadRequestException.INVALID_FILTER); } } }
Assert.assertEquals(caughtException.getScimError().getScimType(), BadRequestException.INVALID_SYNTAX); } else if (!mutabilityIssues.isEmpty()) Assert.assertEquals(caughtException.getScimError().getScimType(), BadRequestException.MUTABILITY); Assert.assertEquals(caughtException.getScimError().getScimType(), BadRequestException.INVALID_PATH); } else
((BadRequestException) e.getCause()).getScimError().getScimType(), BadRequestException.INVALID_PATH); ((BadRequestException) e.getCause()).getScimError().getScimType(), BadRequestException.INVALID_PATH); ((BadRequestException) e.getCause()).getScimError().getScimType(), BadRequestException.INVALID_PATH);
if(!e.getScimError().getScimType().equals( BadRequestException.NO_TARGET))