dulvac commented on code in PR #35: URL: https://github.com/apache/sling-org-apache-sling-testing-clients/pull/35#discussion_r891133784
########## src/test/java/org/apache/sling/testing/clients/SlingClientExceptions.java: ########## @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package org.apache.sling.testing.clients; + +import java.io.IOException; + +import org.apache.sling.testing.clients.exceptions.TestingValidationException; +import org.junit.ClassRule; +import org.junit.Test; + +public class SlingClientExceptions { + + + private static final String ERROR_PATH = "/content/missingResource.json"; Review Comment: ```suggestion private static final String ERROR_PATH = "/content/missingResource.json"; ``` ########## src/test/java/org/apache/sling/testing/clients/SlingClientExceptions.java: ########## @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package org.apache.sling.testing.clients; + +import java.io.IOException; + +import org.apache.sling.testing.clients.exceptions.TestingValidationException; +import org.junit.ClassRule; +import org.junit.Test; + +public class SlingClientExceptions { + + Review Comment: remove extra line break, please ########## src/main/java/org/apache/sling/testing/clients/exceptions/TestingValidationException.java: ########## @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.sling.testing.clients.exceptions; + +import org.apache.http.client.methods.HttpUriRequest; +import org.apache.sling.testing.clients.ClientException; +import org.apache.sling.testing.clients.SlingHttpResponse; + +/** + * Use this exception to indicate any mismatch between expectations and the actual + * test result. This exception typically indicates "real" test failures. + * + */ +public class TestingValidationException extends ClientException { + + public TestingValidationException(String message) { Review Comment: ```suggestion public TestingValidationException(String message) { ``` ########## src/main/java/org/apache/sling/testing/clients/exceptions/TestingIOException.java: ########## @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.sling.testing.clients.exceptions; + +import org.apache.http.client.methods.HttpUriRequest; +import org.apache.sling.testing.clients.ClientException; +import org.apache.sling.testing.clients.SlingHttpResponse; + +/** + * Use this exception to indicate any problems with networking (typically manifested as + * IOException). + */ +public class TestingIOException extends ClientException { + + public TestingIOException(String message) { Review Comment: ```suggestion public TestingIOException(String message) { ``` ########## src/main/java/org/apache/sling/testing/clients/exceptions/TestingValidationException.java: ########## @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.sling.testing.clients.exceptions; + +import org.apache.http.client.methods.HttpUriRequest; +import org.apache.sling.testing.clients.ClientException; +import org.apache.sling.testing.clients.SlingHttpResponse; + +/** + * Use this exception to indicate any mismatch between expectations and the actual + * test result. This exception typically indicates "real" test failures. + * + */ +public class TestingValidationException extends ClientException { + + public TestingValidationException(String message) { Review Comment: same for the lines below ########## src/main/java/org/apache/sling/testing/clients/exceptions/TestingSetupException.java: ########## @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.sling.testing.clients.exceptions; + +import org.apache.http.client.methods.HttpUriRequest; +import org.apache.sling.testing.clients.ClientException; +import org.apache.sling.testing.clients.SlingHttpResponse; + +/** + * Use this exception to signal problems in the test setup, e.g. incorrect or missing + * parameters. + */ +public class TestingSetupException extends ClientException { + + public TestingSetupException(String message) { Review Comment: ```suggestion public TestingSetupException(String message) { ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
