Skip to content

Commit

Permalink
Failed Test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
sathishk committed Jan 27, 2024
1 parent 0c819dd commit b75d573
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,10 @@
import com.github.victools.jsonschema.generator.SchemaGeneratorConfig;
import com.github.victools.jsonschema.generator.SchemaGeneratorConfigBuilder;
import com.github.victools.jsonschema.generator.SchemaVersion;
import com.techatpark.sjson.generator.example.Product;
import org.junit.jupiter.api.Test;
import com.techatpark.sjson.generator.example.ComplexPojo;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import org.junit.jupiter.params.provider.CsvSource;
import org.junit.jupiter.params.provider.ValueSource;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.util.List;
import java.util.stream.Stream;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class JsonSchemaGeneratorTest {
Expand All @@ -40,7 +31,7 @@ public JsonSchemaGeneratorTest() {

@ParameterizedTest
@ValueSource(classes = {
Product.class
ComplexPojo.class
})
void testGenerator(final Class theClass) throws Exception {
String rawJsonSchema = objectMapper.writeValueAsString(generator.generateSchema(theClass));
Expand All @@ -50,6 +41,4 @@ void testGenerator(final Class theClass) throws Exception {
"JSON Schema was not generated properly");
}



}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.techatpark.sjson.generator.example;

import java.util.List;
import java.util.Map;

public class ComplexPojo {
private int integerValue;
private double doubleValue;
private boolean booleanValue;
private String stringValue;
private List<String> stringList;
private Map<String, Integer> stringIntegerMap;
private NestedObject nestedObject;
private int[] intArray;
private NestedObject[] nestedObjectArray;

// Constructors, getters, and setters can be added as needed.

public static class NestedObject {
private String nestedStringValue;
private boolean nestedBooleanValue;

// Constructors, getters, and setters can be added as needed.
}
}
43 changes: 0 additions & 43 deletions src/test/java/com/techatpark/sjson/generator/example/Product.java

This file was deleted.

0 comments on commit b75d573

Please sign in to comment.