// Path: core/src/main/java/io/t28/json2java/core/naming/DefaultNamePolicy.java
// public enum DefaultNamePolicy implements NamePolicy {
//     CLASS {
//         @Nonnull
//         @Override
//         public String convert(@Nonnull String name, @Nonnull TypeName type) {
//             return format(name, CaseFormat.UPPER_CAMEL);
//         }
//     },
//     METHOD {
//         private static final String BOOLEAN_PREFIX = "is";
//         private static final String GENERAL_PREFIX = "get";
// 
//         @Nonnull
//         @Override
//         public String convert(@Nonnull String name, @Nonnull TypeName type) {
//             final StringBuilder builder = new StringBuilder();
//             if (type.equals(TypeName.BOOLEAN) || type.equals(ClassName.get(Boolean.class))) {
//                 builder.append(BOOLEAN_PREFIX);
//             } else {
//                 builder.append(GENERAL_PREFIX);
//             }
//             return builder.append(format(name, CaseFormat.UPPER_CAMEL))
//                     .toString();
//         }
//     },
//     FIELD {
//         @Nonnull
//         @Override
//         public String convert(@Nonnull String name, @Nonnull TypeName type) {
//             return format(name, CaseFormat.LOWER_CAMEL);
//         }
//     },
//     PARAMETER {
//         @Nonnull
//         @Override
//         public String convert(@Nonnull String name, @Nonnull TypeName type) {
//             return format(name, CaseFormat.LOWER_CAMEL);
//         }
//     };
// 
//     private static final String NO_TEXT = "";
//     private static final String DELIMITER = "_";
//     private static final String DELIMITER_REGEX = "(_|-|\\s|\\.|:)";
//     private static final String CAMEL_CASE_REGEX = "(?<!(^|[A-Z]))(?=[A-Z])|(?<!^)(?=[A-Z][a-z])";
//     private static final String INVALID_IDENTIFIER_REGEX = "[^A-Za-z0-9_$]";
// 
//     @Nonnull
//     @CheckReturnValue
//     public static String format(@Nonnull String name, @Nonnull CaseFormat format) {
//         final Matcher matcher = Pattern.compile(DELIMITER_REGEX).matcher(name);
//         final String pattern;
//         if (matcher.find()) {
//             pattern = DELIMITER_REGEX;
//         } else {
//             pattern = CAMEL_CASE_REGEX;
//         }
//         final String snakeCase = Stream.of(name.split(pattern))
//                 .map(Ascii::toLowerCase)
//                 .map(part -> part.replaceAll(INVALID_IDENTIFIER_REGEX, NO_TEXT))
//                 .filter(part -> !Strings.isNullOrEmpty(part))
//                 .collect(Collectors.joining(DELIMITER));
//         return CaseFormat.LOWER_UNDERSCORE.to(format, snakeCase);
//     }
// }
// 
// Path: core/src/test/java/io/t28/json2java/core/Assertions.java
// @Nonnull
// @CheckReturnValue
// public static JsonValueAssert assertThat(@Nullable JsonValue actual) {
//     return new JsonValueAssert(actual);
// }


import com.squareup.javapoet.CodeBlock;
import com.squareup.javapoet.FieldSpec;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.TypeName;
import io.t28.json2java.core.naming.DefaultNamePolicy;
import org.junit.Before;
import org.junit.Test;
import javax.lang.model.element.Modifier;
import java.util.List;
import static io.t28.json2java.core.Assertions.assertThat;
/*
 * Copyright (c) 2017 Tatsuya Maki
 *
 * 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 io.t28.json2java.core.builder;




public class ModelClassBuilderTest {
    private ModelClassBuilder underTest;

    @Before
    public void setUp() throws Exception {
        underTest = new ModelClassBuilder(
                DefaultNamePolicy.FIELD,
// Path: core/src/main/java/io/t28/json2java/core/naming/DefaultNamePolicy.java
// public enum DefaultNamePolicy implements NamePolicy {
//     CLASS {
//         @Nonnull
//         @Override
//         public String convert(@Nonnull String name, @Nonnull TypeName type) {
//             return format(name, CaseFormat.UPPER_CAMEL);
//         }
//     },
//     METHOD {
//         private static final String BOOLEAN_PREFIX = "is";
//         private static final String GENERAL_PREFIX = "get";
// 
//         @Nonnull
//         @Override
//         public String convert(@Nonnull String name, @Nonnull TypeName type) {
//             final StringBuilder builder = new StringBuilder();
//             if (type.equals(TypeName.BOOLEAN) || type.equals(ClassName.get(Boolean.class))) {
//                 builder.append(BOOLEAN_PREFIX);
//             } else {
//                 builder.append(GENERAL_PREFIX);
//             }
//             return builder.append(format(name, CaseFormat.UPPER_CAMEL))
//                     .toString();
//         }
//     },
//     FIELD {
//         @Nonnull
//         @Override
//         public String convert(@Nonnull String name, @Nonnull TypeName type) {
//             return format(name, CaseFormat.LOWER_CAMEL);
//         }
//     },
//     PARAMETER {
//         @Nonnull
//         @Override
//         public String convert(@Nonnull String name, @Nonnull TypeName type) {
//             return format(name, CaseFormat.LOWER_CAMEL);
//         }
//     };
// 
//     private static final String NO_TEXT = "";
//     private static final String DELIMITER = "_";
//     private static final String DELIMITER_REGEX = "(_|-|\\s|\\.|:)";
//     private static final String CAMEL_CASE_REGEX = "(?<!(^|[A-Z]))(?=[A-Z])|(?<!^)(?=[A-Z][a-z])";
//     private static final String INVALID_IDENTIFIER_REGEX = "[^A-Za-z0-9_$]";
// 
//     @Nonnull
//     @CheckReturnValue
//     public static String format(@Nonnull String name, @Nonnull CaseFormat format) {
//         final Matcher matcher = Pattern.compile(DELIMITER_REGEX).matcher(name);
//         final String pattern;
//         if (matcher.find()) {
//             pattern = DELIMITER_REGEX;
//         } else {
//             pattern = CAMEL_CASE_REGEX;
//         }
//         final String snakeCase = Stream.of(name.split(pattern))
//                 .map(Ascii::toLowerCase)
//                 .map(part -> part.replaceAll(INVALID_IDENTIFIER_REGEX, NO_TEXT))
//                 .filter(part -> !Strings.isNullOrEmpty(part))
//                 .collect(Collectors.joining(DELIMITER));
//         return CaseFormat.LOWER_UNDERSCORE.to(format, snakeCase);
//     }
// }
// 
// Path: core/src/test/java/io/t28/json2java/core/Assertions.java
// @Nonnull
// @CheckReturnValue
// public static JsonValueAssert assertThat(@Nullable JsonValue actual) {
//     return new JsonValueAssert(actual);
// }


// Path: core/src/test/java/io/t28/json2java/core/builder/ModelClassBuilderTest.java
import com.squareup.javapoet.CodeBlock;
import com.squareup.javapoet.FieldSpec;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.TypeName;
import io.t28.json2java.core.naming.DefaultNamePolicy;
import org.junit.Before;
import org.junit.Test;
import javax.lang.model.element.Modifier;
import java.util.List;
import static io.t28.json2java.core.Assertions.assertThat;

/*
 * Copyright (c) 2017 Tatsuya Maki
 *
 * 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 io.t28.json2java.core.builder;




public class ModelClassBuilderTest {
    private ModelClassBuilder underTest;

    @Before
    public void setUp() throws Exception {
        underTest = new ModelClassBuilder(
                DefaultNamePolicy.FIELD,
                DefaultNamePolicy.METHOD,