// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/Option.java
// public enum Option {
//     /**
//      * Treats null nodes in actual value as absent. In other words
//      * if you expect {"test":{"a":1}} this {"test":{"a":1, "b": null}} will pass the test.
//      * When using within {@link ConfigurationWhen#then(Option, Option...)}, exact path to such nodes should be passed,
//      * which is test.b in the example above.
//      */
//     TREATING_NULL_AS_ABSENT,
// 
//     /**
//      * When comparing arrays, ignores array order. In other words, treats arrays as sets.
//      */
//     IGNORING_ARRAY_ORDER,
// 
//     /**
//      * Ignores extra fields in the actual value.
//      * When using within {@link ConfigurationWhen#then(Option, Option...)}, path to the nodes with such fields should be passed.
//      */
//     IGNORING_EXTRA_FIELDS,
// 
// 
//     /**
//      * Passes even if array in compared document has more items than expected.
//      * Items are taken from the beginning of the expected array unless IGNORING_ARRAY_ORDER is specified.
//      */
//     IGNORING_EXTRA_ARRAY_ITEMS,
// 
//     /**
//      * Compares only structures. Completely ignores both values and types.
//      * Is too lenient, ignores types, prefer {@link Option#IGNORING_VALUES} instead.
//      *
//      * @deprecated Use IGNORING_VALUES option instead
//      */
//     @Deprecated
//     COMPARING_ONLY_STRUCTURE,
// 
//     /**
//      * Ignores values but fails if value types are different.
//      * When using within {@link ConfigurationWhen#then(Option, Option...)}, path to the node with ignored value should be passed.
//      */
//     IGNORING_VALUES
// }
// 
// Path: json-unit-fluent/src/main/java/net/javacrumbs/jsonunit/fluent/JsonFluentAssert.java
// public static ConfigurableJsonFluentAssert assertThatJson(Object json) {
//     return new ConfigurableJsonFluentAssert(convertToJson(json, ACTUAL), getPathPrefix(json));
// }
// 
// Path: json-unit-json-path/src/main/java/net/javacrumbs/jsonunit/jsonpath/JsonPathAdapter.java
// public static Object inPath(@NotNull Object json, @NotNull String path) {
//     String normalizedPath = fromBracketNotation(path);
//     try {
//         MatchRecordingListener recordingListener = new MatchRecordingListener();
//         Object value = readValue(defaultConfiguration().addEvaluationListeners(recordingListener), json, path);
//         return jsonSource(wrapDeserializedObject(value), normalizedPath, recordingListener.getMatchingPaths());
//     } catch (PathNotFoundException e) {
//         return jsonSource(missingNode(), normalizedPath);
//     }
// }


import net.javacrumbs.jsonunit.core.Option;
import org.junit.jupiter.api.Test;
import static net.javacrumbs.jsonunit.fluent.JsonFluentAssert.assertThatJson;
import static net.javacrumbs.jsonunit.jsonpath.JsonPathAdapter.inPath;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
/**
 * Copyright 2009-2019 the original author or authors.
 *
 * Licensed 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 net.javacrumbs.jsonunit.test.jsonpath;



class JsonPathTest {
    @Test
    void shouldBeAbleToUseSimpleValues() {
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/Option.java
// public enum Option {
//     /**
//      * Treats null nodes in actual value as absent. In other words
//      * if you expect {"test":{"a":1}} this {"test":{"a":1, "b": null}} will pass the test.
//      * When using within {@link ConfigurationWhen#then(Option, Option...)}, exact path to such nodes should be passed,
//      * which is test.b in the example above.
//      */
//     TREATING_NULL_AS_ABSENT,
// 
//     /**
//      * When comparing arrays, ignores array order. In other words, treats arrays as sets.
//      */
//     IGNORING_ARRAY_ORDER,
// 
//     /**
//      * Ignores extra fields in the actual value.
//      * When using within {@link ConfigurationWhen#then(Option, Option...)}, path to the nodes with such fields should be passed.
//      */
//     IGNORING_EXTRA_FIELDS,
// 
// 
//     /**
//      * Passes even if array in compared document has more items than expected.
//      * Items are taken from the beginning of the expected array unless IGNORING_ARRAY_ORDER is specified.
//      */
//     IGNORING_EXTRA_ARRAY_ITEMS,
// 
//     /**
//      * Compares only structures. Completely ignores both values and types.
//      * Is too lenient, ignores types, prefer {@link Option#IGNORING_VALUES} instead.
//      *
//      * @deprecated Use IGNORING_VALUES option instead
//      */
//     @Deprecated
//     COMPARING_ONLY_STRUCTURE,
// 
//     /**
//      * Ignores values but fails if value types are different.
//      * When using within {@link ConfigurationWhen#then(Option, Option...)}, path to the node with ignored value should be passed.
//      */
//     IGNORING_VALUES
// }
// 
// Path: json-unit-fluent/src/main/java/net/javacrumbs/jsonunit/fluent/JsonFluentAssert.java
// public static ConfigurableJsonFluentAssert assertThatJson(Object json) {
//     return new ConfigurableJsonFluentAssert(convertToJson(json, ACTUAL), getPathPrefix(json));
// }
// 
// Path: json-unit-json-path/src/main/java/net/javacrumbs/jsonunit/jsonpath/JsonPathAdapter.java
// public static Object inPath(@NotNull Object json, @NotNull String path) {
//     String normalizedPath = fromBracketNotation(path);
//     try {
//         MatchRecordingListener recordingListener = new MatchRecordingListener();
//         Object value = readValue(defaultConfiguration().addEvaluationListeners(recordingListener), json, path);
//         return jsonSource(wrapDeserializedObject(value), normalizedPath, recordingListener.getMatchingPaths());
//     } catch (PathNotFoundException e) {
//         return jsonSource(missingNode(), normalizedPath);
//     }
// }


// Path: tests/test-json-path/src/test/java/net/javacrumbs/jsonunit/test/jsonpath/JsonPathTest.java
import net.javacrumbs.jsonunit.core.Option;
import org.junit.jupiter.api.Test;
import static net.javacrumbs.jsonunit.fluent.JsonFluentAssert.assertThatJson;
import static net.javacrumbs.jsonunit.jsonpath.JsonPathAdapter.inPath;
import static org.assertj.core.api.Assertions.assertThatThrownBy;

/**
 * Copyright 2009-2019 the original author or authors.
 *
 * Licensed 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 net.javacrumbs.jsonunit.test.jsonpath;



class JsonPathTest {
    @Test
    void shouldBeAbleToUseSimpleValues() {
        assertThatJson(inPath(json, "$.store.book[*].author"))