From 6c5ee64f8d933aababf76e201ba2bf6c144286dc Mon Sep 17 00:00:00 2001 From: "Matteo Franci a.k.a. Fugerit" Date: Tue, 12 Sep 2023 15:48:42 +0200 Subject: [PATCH 1/2] Test coverage simple table --- .../lib/simpletable/SimpleTableFacade.java | 22 +--- .../lib/simpletable/SimpleTableHelper.java | 4 +- .../doc/lib/simpletable/TestSimpleTable.java | 109 ++++++++++++++++++ 3 files changed, 113 insertions(+), 22 deletions(-) create mode 100644 fj-doc-lib-simpletable/src/test/java/test/org/fugerit/java/doc/lib/simpletable/TestSimpleTable.java diff --git a/fj-doc-lib-simpletable/src/main/java/org/fugerit/java/doc/lib/simpletable/SimpleTableFacade.java b/fj-doc-lib-simpletable/src/main/java/org/fugerit/java/doc/lib/simpletable/SimpleTableFacade.java index 7307bf4de..6fea7c089 100644 --- a/fj-doc-lib-simpletable/src/main/java/org/fugerit/java/doc/lib/simpletable/SimpleTableFacade.java +++ b/fj-doc-lib-simpletable/src/main/java/org/fugerit/java/doc/lib/simpletable/SimpleTableFacade.java @@ -1,11 +1,7 @@ package org.fugerit.java.doc.lib.simpletable; -import java.util.Arrays; import java.util.List; -import java.util.stream.Collectors; -import org.fugerit.java.core.cfg.ConfigRuntimeException; -import org.fugerit.java.core.lang.helpers.StringUtils; import org.fugerit.java.doc.lib.simpletable.model.SimpleTable; public class SimpleTableFacade { @@ -22,10 +18,7 @@ private SimpleTableFacade() {} * @return the new table model initialized */ public static SimpleTable newTable( Integer... colWidths ) { - if ( colWidths == null ) { - throw new ConfigRuntimeException( "Minimum one colunm must be provided" ); - } - return newTable( Arrays.asList( colWidths ) ); + return newHelper().newTable( colWidths ); } /** @@ -38,18 +31,7 @@ public static SimpleTable newTable( Integer... colWidths ) { * @return the new table model initialized */ public static SimpleTable newTable( List colWidths ) { - if ( colWidths == null ) { - throw new ConfigRuntimeException( "Minimum one colunm must be provided" ); - } else { - int sum = 0; - for ( int v : colWidths ) { - sum+=v; - } - if ( sum != 100 ) { - throw new ConfigRuntimeException( "Column width sum must be 100, while is : "+sum ); - } - } - return new SimpleTable( StringUtils.concat( ";" , colWidths.stream().map( v -> v.toString() ).collect( Collectors.toList() ) ) ); + return newHelper().newTable( colWidths ); } /** diff --git a/fj-doc-lib-simpletable/src/main/java/org/fugerit/java/doc/lib/simpletable/SimpleTableHelper.java b/fj-doc-lib-simpletable/src/main/java/org/fugerit/java/doc/lib/simpletable/SimpleTableHelper.java index 6047fdcb6..21dfaf2ed 100644 --- a/fj-doc-lib-simpletable/src/main/java/org/fugerit/java/doc/lib/simpletable/SimpleTableHelper.java +++ b/fj-doc-lib-simpletable/src/main/java/org/fugerit/java/doc/lib/simpletable/SimpleTableHelper.java @@ -35,7 +35,7 @@ public Integer getDefaultBorderWidth() { * @return the new table model initialized */ public SimpleTable newTable( Integer... colWidths ) { - if ( colWidths == null ) { + if ( colWidths == null || colWidths.length == 0 ) { throw new ConfigRuntimeException( "Minimum one colunm must be provided" ); } return newTable( Arrays.asList( colWidths ) ); @@ -51,7 +51,7 @@ public SimpleTable newTable( Integer... colWidths ) { * @return the new table model initialized */ public SimpleTable newTable( List colWidths ) { - if ( colWidths == null ) { + if ( colWidths == null || colWidths.isEmpty() ) { throw new ConfigRuntimeException( "Minimum one colunm must be provided" ); } else { int sum = 0; diff --git a/fj-doc-lib-simpletable/src/test/java/test/org/fugerit/java/doc/lib/simpletable/TestSimpleTable.java b/fj-doc-lib-simpletable/src/test/java/test/org/fugerit/java/doc/lib/simpletable/TestSimpleTable.java new file mode 100644 index 000000000..448eefcb4 --- /dev/null +++ b/fj-doc-lib-simpletable/src/test/java/test/org/fugerit/java/doc/lib/simpletable/TestSimpleTable.java @@ -0,0 +1,109 @@ +package test.org.fugerit.java.doc.lib.simpletable; + +import java.io.ByteArrayOutputStream; +import java.util.ArrayList; +import java.util.List; + +import org.fugerit.java.core.cfg.ConfigRuntimeException; +import org.fugerit.java.core.function.SafeFunction; +import org.fugerit.java.core.lang.helpers.BooleanUtils; +import org.fugerit.java.doc.base.config.DocConfig; +import org.fugerit.java.doc.base.config.DocException; +import org.fugerit.java.doc.base.config.DocInput; +import org.fugerit.java.doc.base.config.DocOutput; +import org.fugerit.java.doc.base.config.DocTypeHandlerDefault; +import org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlTypeHandler; +import org.fugerit.java.doc.lib.simpletable.SimpleTableDocConfig; +import org.fugerit.java.doc.lib.simpletable.SimpleTableFacade; +import org.fugerit.java.doc.lib.simpletable.SimpleTableHelper; +import org.fugerit.java.doc.lib.simpletable.model.SimpleCell; +import org.fugerit.java.doc.lib.simpletable.model.SimpleRow; +import org.fugerit.java.doc.lib.simpletable.model.SimpleTable; +import org.junit.Assert; +import org.junit.Test; + +public class TestSimpleTable { + + private void testTable( SimpleTable table, SimpleTableHelper helper ) { + table.addRow( helper.newHeaderRow( "H1", "H2" ) ); + table.addRow( helper.newNormalRow( "C1", "C2" ) ); + table.withDocLanguage( "it" ).withSheetName( "a" ).withTableWidth( "1" ); + table.setDocLanguage( "en" ); + table.setSheetName( "b" ); + table.getDefaultBorderWidth(); + table.setDefaultBorderWidth( SimpleCell.BORDER_WIDTH_UNSET ); + SimpleCell cell = new SimpleCell( "a", SimpleCell.BORDER_WIDTH_UNSET ); + SimpleRow row = new SimpleRow(); + row.addCell( cell ); + table.addRow( row ); + SafeFunction.apply( () -> { + try ( ByteArrayOutputStream baos = new ByteArrayOutputStream() ) { + SimpleTableDocConfig.newConfigLatest().processSimpleTable( table , FreeMarkerHtmlTypeHandler.HANDLER, baos ); + Assert.assertTrue( baos.toByteArray().length > 0 ); + } + } ); + Assert.assertThrows( DocException.class , () -> { + try ( ByteArrayOutputStream baos = new ByteArrayOutputStream() ) { + SimpleTableDocConfig.newConfigLatest().processSimpleTable( table , new FailTypeHandler(), baos ); + Assert.assertTrue( baos.toByteArray().length > 0 ); + } + } ); + } + + @Test + public void testHelper() { + Integer defaultBorder = 0; + SimpleTableHelper helper = SimpleTableFacade.newHelper().withDefaultBorderWidth( defaultBorder ); + Assert.assertEquals( defaultBorder , helper.getDefaultBorderWidth() ); + List lcw = new ArrayList(); + Assert.assertThrows( ConfigRuntimeException.class, () -> helper.newTable( lcw ) ); + Assert.assertThrows( ConfigRuntimeException.class, () -> helper.newTable() ); + List colWidths = null; + Assert.assertThrows( ConfigRuntimeException.class, () -> helper.newTable( colWidths ) ); + Integer[] colWidthsA = null; + Assert.assertThrows( ConfigRuntimeException.class, () -> helper.newTable( colWidthsA ) ); + Integer[] colWidths50 = { 20, 30 }; + Assert.assertThrows( ConfigRuntimeException.class, () -> helper.newTable( colWidths50 ) ); + // new table ok + Assert.assertNotNull( helper.newTableSingleColumn() ); + SimpleTable table = helper.newTable( 50, 50 ); + this.testTable(table, helper); + } + + @Test + public void testFacade() { + Assert.assertNotNull( SimpleTableFacade.newTable( 100 ) ); + Assert.assertNotNull( SimpleTableFacade.newTableSingleColumn() ); + List colW = new ArrayList<>(); + colW.add( 100 ); + Assert.assertNotNull( SimpleTableFacade.newTable( colW ) ); + } + + @Test + public void testCell() { + SimpleCell cell = new SimpleCell( "test", 10 ).bold().bolditalic().italic().left().rigt().underline(); + cell.setContent( "aaaa" ); + Assert.assertNotNull( SimpleCell.newCell( "bbb" ) ); + SimpleRow row = new SimpleRow(); + row.addCell( "cccc" ); + row.setHead( BooleanUtils.BOOLEAN_TRUE ); + } + +} + +class FailTypeHandler extends DocTypeHandlerDefault { + + private static final long serialVersionUID = -938363784671460227L; + + public FailTypeHandler() { + super( DocConfig.TYPE_PDF, "fail-pdf"); + } + + @Override + public void handle(DocInput docInput, DocOutput docOutput) throws Exception { + if ( DocConfig.TYPE_PDF.equalsIgnoreCase( docInput.getType() ) ) { + throw new DocException( "Scenario exception" ); + } + } + +} \ No newline at end of file From 12de1684c2a0a648553e6584b85a3509329e8891 Mon Sep 17 00:00:00 2001 From: "Matteo Franci a.k.a. Fugerit" Date: Tue, 12 Sep 2023 20:58:56 +0200 Subject: [PATCH 2/2] Test converage helper --- .../freemarker/process/ChainStepModel.java | 8 +- .../doc/freemarker/process/DocChainModel.java | 16 ++-- .../FreemarkerDocProcessConfigFacade.java | 2 +- .../doc/freemarker/tool/model/ChainModel.java | 10 +- .../freemarker/tool/model/ConfigModel.java | 5 +- .../doc/freemarker/tool/model/StepModel.java | 8 +- .../coverage/TestFreemarkerCoverage.java | 76 +++++++++++++++ .../TestFreemarkerDocProcessConfig.java | 40 ++++++++ .../doc/freemarker/tool/TestGenerateStub.java | 40 ++++++++ .../resources/coverage/xml/default_doc.xml | 87 ++++++++++++++++++ .../coverage/xml/default_doc_alt.xml | 65 +++++++++++++ .../coverage/xml/default_doc_fail1.xml | 58 ++++++++++++ .../freemarker-doc-process_alt.xml | 49 ++++++++++ .../fj_doc_test/template/test_01.ftl | 78 ++++++++++++++++ .../doc-process-autodoc.xml | 53 +++++++++++ .../src/test/resources/test/img_test_blue.png | Bin 0 -> 864 bytes .../test/resources/test/img_test_green.png | Bin 0 -> 865 bytes .../src/test/resources/test/img_test_red.png | Bin 0 -> 829 bytes .../src/test/resources/test/img_test_teal.jpg | Bin 0 -> 10632 bytes .../src/test/resources/test/img_test_teal.png | Bin 0 -> 842 bytes fj-doc-playground-quarkus/pom.xml | 56 ++++------- .../java/doc/playground/RestHelper.java | 27 ++++++ .../doc/playground/catalog/CatalogRest.java | 35 +++---- .../doc/playground/convert/ConvertRest.java | 46 +++++---- .../java/doc/playground/doc/GenerateRest.java | 22 ++--- .../doc/playground/facade/InputFacade.java | 8 ++ .../java/doc/playground/meta/MetaRest.java | 14 +-- .../java/doc/playground/val/ValRest.java | 32 +++---- .../fugerit/java/GreetingResourceTest.java | 7 +- .../java/doc/playground/CatalogRestTest.java | 31 +++++++ .../java/doc/playground/ConvertRestTest.java | 54 +++++++++++ .../java/doc/playground/GenerateRestTest.java | 54 +++++++++++ .../java/doc/playground/MetaRestTest.java | 22 +++++ .../java/doc/playground/TestRestHelper.java | 26 ++++++ .../java/doc/playground/ValRestIT.java | 8 -- .../java/doc/playground/ValRestTest.java | 49 +++++++++- .../convert/test_convert_input_01.json | 5 + .../convert/test_convert_input_02.json | 5 + .../convert/test_convert_input_03.json | 5 + .../convert/test_convert_input_04.json | 5 + .../convert/test_convert_input_05.json | 5 + .../convert/test_convert_input_06.json | 5 + .../convert/test_convert_input_07.json | 5 + .../convert/test_convert_input_08.json | 5 + .../generate/test_generate_input_01.json | 5 + .../generate/test_generate_input_02.json | 5 + .../generate/test_generate_input_03.json | 5 + .../generate/test_generate_input_04.json | 5 + .../generate/test_generate_input_05.json | 5 + .../generate/test_generate_input_06.json | 5 + .../request/payload/val/pdf_as_pdf.pdf | Bin 0 -> 37139 bytes .../request/payload/val/png_as_pdf.pdf | Bin 0 -> 2609 bytes 52 files changed, 988 insertions(+), 168 deletions(-) create mode 100644 fj-doc-freemarker/src/test/java/test/org/fugerit/java/doc/freemarker/coverage/TestFreemarkerCoverage.java create mode 100644 fj-doc-freemarker/src/test/java/test/org/fugerit/java/doc/freemarker/tool/TestGenerateStub.java create mode 100644 fj-doc-freemarker/src/test/resources/coverage/xml/default_doc.xml create mode 100644 fj-doc-freemarker/src/test/resources/coverage/xml/default_doc_alt.xml create mode 100644 fj-doc-freemarker/src/test/resources/coverage/xml/default_doc_fail1.xml create mode 100644 fj-doc-freemarker/src/test/resources/fj_doc_test/freemarker-doc-process_alt.xml create mode 100644 fj-doc-freemarker/src/test/resources/fj_doc_test/template/test_01.ftl create mode 100644 fj-doc-freemarker/src/test/resources/generate-stub-test/doc-process-autodoc.xml create mode 100644 fj-doc-freemarker/src/test/resources/test/img_test_blue.png create mode 100644 fj-doc-freemarker/src/test/resources/test/img_test_green.png create mode 100644 fj-doc-freemarker/src/test/resources/test/img_test_red.png create mode 100644 fj-doc-freemarker/src/test/resources/test/img_test_teal.jpg create mode 100644 fj-doc-freemarker/src/test/resources/test/img_test_teal.png create mode 100644 fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/RestHelper.java create mode 100644 fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/CatalogRestTest.java create mode 100644 fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ConvertRestTest.java create mode 100644 fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/GenerateRestTest.java create mode 100644 fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/MetaRestTest.java create mode 100644 fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/TestRestHelper.java delete mode 100644 fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValRestIT.java create mode 100644 fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_01.json create mode 100644 fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_02.json create mode 100644 fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_03.json create mode 100644 fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_04.json create mode 100644 fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_05.json create mode 100644 fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_06.json create mode 100644 fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_07.json create mode 100644 fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_08.json create mode 100644 fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_01.json create mode 100644 fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_02.json create mode 100644 fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_03.json create mode 100644 fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_04.json create mode 100644 fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_05.json create mode 100644 fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_06.json create mode 100644 fj-doc-playground-quarkus/src/test/resources/request/payload/val/pdf_as_pdf.pdf create mode 100644 fj-doc-playground-quarkus/src/test/resources/request/payload/val/png_as_pdf.pdf diff --git a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/process/ChainStepModel.java b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/process/ChainStepModel.java index b83f847bd..6508e3e2f 100644 --- a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/process/ChainStepModel.java +++ b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/process/ChainStepModel.java @@ -3,15 +3,15 @@ import java.io.Serializable; import java.util.Properties; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data public class ChainStepModel implements Serializable { private static final long serialVersionUID = 622077549080786391L; - private String stepType; + @Getter @Setter private String stepType; - private Properties attributes; + @Getter @Setter private Properties attributes; } diff --git a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/process/DocChainModel.java b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/process/DocChainModel.java index c227a0f98..c77871b51 100644 --- a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/process/DocChainModel.java +++ b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/process/DocChainModel.java @@ -8,9 +8,9 @@ import org.fugerit.java.core.cfg.xml.IdConfigType; import org.fugerit.java.core.util.collection.KeyString; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data public class DocChainModel implements IdConfigType, KeyString, Serializable { public static final String MAP_ATTS_ALL = "all"; @@ -23,17 +23,17 @@ public class DocChainModel implements IdConfigType, KeyString, Serializable { private static final long serialVersionUID = 9076457107043072322L; - private String id; + @Getter @Setter private String id; - private String templatePath = DEFAULT_TEMPLATE_PATH; + @Getter @Setter private String templatePath = DEFAULT_TEMPLATE_PATH; - private String mapAtts = MAP_ATTS_DEFAULT; + @Getter @Setter private String mapAtts = MAP_ATTS_DEFAULT; - private String parent; + @Getter @Setter private String parent; - private Properties mapAttsEnum; + @Getter @Setter private Properties mapAttsEnum; - private List chainStepList = new ArrayList<>(); + @Getter private List chainStepList = new ArrayList<>(); @Override public String getKey() { diff --git a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/process/FreemarkerDocProcessConfigFacade.java b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/process/FreemarkerDocProcessConfigFacade.java index fb06efbdb..a24da02be 100644 --- a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/process/FreemarkerDocProcessConfigFacade.java +++ b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/process/FreemarkerDocProcessConfigFacade.java @@ -155,7 +155,7 @@ private static void handleChainStepList( DocChainModel model, Element currentTag if ( STEP_TYPE_CONFIG.equalsIgnoreCase( chainStepModel.getStepType() ) ) { NodeList configList = currentChainStepTag.getElementsByTagName( STEP_TYPE_CONFIG ); if ( configList.getLength() != 1 ) { - throw new ConfigException( "Expcted only one config tag : "+configList.getLength() ); + throw new ConfigException( "Expected only one config tag : "+configList.getLength() ); } else { Element configTag = (Element)configList.item( 0 ); atts.putAll( DOMUtils.attributesToProperties( configTag ) ); diff --git a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/ChainModel.java b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/ChainModel.java index c0deb0229..21b501bf7 100644 --- a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/ChainModel.java +++ b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/ChainModel.java @@ -4,18 +4,18 @@ import java.util.ArrayList; import java.util.List; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data public class ChainModel implements Serializable { private static final long serialVersionUID = 3421438389573953861L; - private List stepList; + @Getter private List stepList; - private String id; + @Getter @Setter private String id; - private String parent; + @Getter @Setter private String parent; public ChainModel( String id ) { this.setId( id ); diff --git a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/ConfigModel.java b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/ConfigModel.java index af324a5b4..43b98e1c1 100644 --- a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/ConfigModel.java +++ b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/ConfigModel.java @@ -4,14 +4,13 @@ import java.util.ArrayList; import java.util.List; -import lombok.Data; +import lombok.Getter; -@Data public class ConfigModel implements Serializable { private static final long serialVersionUID = 5198896174327509127L; - private List chainList; + @Getter private List chainList; public ConfigModel() { this.chainList = new ArrayList<>(); diff --git a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/StepModel.java b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/StepModel.java index 8709b4de4..ee60f8a5f 100644 --- a/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/StepModel.java +++ b/fj-doc-freemarker/src/main/java/org/fugerit/java/doc/freemarker/tool/model/StepModel.java @@ -3,14 +3,14 @@ import java.util.LinkedHashMap; import java.util.Set; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data public class StepModel { - private String type; + @Getter @Setter private String type; - private LinkedHashMap atts; + @Getter private LinkedHashMap atts; public StepModel(String type) { super(); diff --git a/fj-doc-freemarker/src/test/java/test/org/fugerit/java/doc/freemarker/coverage/TestFreemarkerCoverage.java b/fj-doc-freemarker/src/test/java/test/org/fugerit/java/doc/freemarker/coverage/TestFreemarkerCoverage.java new file mode 100644 index 000000000..1a1e9bb2c --- /dev/null +++ b/fj-doc-freemarker/src/test/java/test/org/fugerit/java/doc/freemarker/coverage/TestFreemarkerCoverage.java @@ -0,0 +1,76 @@ +package test.org.fugerit.java.doc.freemarker.coverage; + +import java.io.ByteArrayOutputStream; +import java.io.InputStreamReader; +import java.util.Arrays; + +import org.fugerit.java.core.function.SafeFunction; +import org.fugerit.java.core.function.SimpleValue; +import org.fugerit.java.core.lang.helpers.ClassHelper; +import org.fugerit.java.doc.base.config.DocInput; +import org.fugerit.java.doc.base.config.DocOutput; +import org.fugerit.java.doc.base.config.DocTypeHandler; +import org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlFragmentTypeHandler; +import org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlFragmentTypeHandlerUTF8; +import org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlTypeHandler; +import org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlTypeHandlerUTF8; +import org.junit.Assert; +import org.junit.Test; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.ToString; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class TestFreemarkerCoverage { + + private final static TestEntry[] TEST_LIST = { + new TestEntry( "default_doc" , true ), + new TestEntry( "default_doc_alt" , true ), + new TestEntry( "default_doc_fail1" , true ) + }; + + private final static DocTypeHandler[] HANDLERS = { FreeMarkerHtmlTypeHandler.HANDLER, + FreeMarkerHtmlTypeHandlerUTF8.HANDLER, + FreeMarkerHtmlFragmentTypeHandler.HANDLER, + FreeMarkerHtmlFragmentTypeHandlerUTF8.HANDLER }; + + private boolean worker( String path, boolean result ) { + SimpleValue res = new SimpleValue<>(false); + SafeFunction.apply( () -> { + for ( int k=0; k 0 ); + } else { + res.setValue( buffer.toByteArray().length == 0 ); + } + } + } + } ); + return res.getValue(); + } + + @Test + public void test01() { + Arrays.asList( TEST_LIST ).stream().forEach( c -> { + log.info( "test -> {}", c ); + Assert.assertTrue( this.worker( "coverage/xml/"+c.getId()+".xml", c.isResult() ) ); + } ); + } + +} + +@AllArgsConstructor +@ToString +class TestEntry { + + @Getter private String id; + + @Getter private boolean result; + +} \ No newline at end of file diff --git a/fj-doc-freemarker/src/test/java/test/org/fugerit/java/doc/freemarker/process/TestFreemarkerDocProcessConfig.java b/fj-doc-freemarker/src/test/java/test/org/fugerit/java/doc/freemarker/process/TestFreemarkerDocProcessConfig.java index 9a7473fcf..0afac3133 100644 --- a/fj-doc-freemarker/src/test/java/test/org/fugerit/java/doc/freemarker/process/TestFreemarkerDocProcessConfig.java +++ b/fj-doc-freemarker/src/test/java/test/org/fugerit/java/doc/freemarker/process/TestFreemarkerDocProcessConfig.java @@ -2,10 +2,14 @@ import static org.junit.Assert.fail; +import java.io.ByteArrayOutputStream; import java.io.InputStreamReader; import java.io.Reader; +import org.fugerit.java.core.cfg.ConfigException; import org.fugerit.java.core.lang.helpers.ClassHelper; +import org.fugerit.java.doc.base.config.DocConfig; +import org.fugerit.java.doc.base.process.DocProcessContext; import org.fugerit.java.doc.freemarker.config.FreeMarkerConfigStep; import org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfig; import org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfigFacade; @@ -24,6 +28,7 @@ public void testConfigRead001() { try ( Reader xmlReader = new InputStreamReader( ClassHelper.loadFromDefaultClassLoader( "fj_doc_test/freemarker-doc-process.xml" ) ) ) { FreemarkerDocProcessConfig config = FreemarkerDocProcessConfigFacade.loadConfig(xmlReader); log.info( "config {}", config.getChain( "sample_chain" ) ); + Assert.assertNotNull( config ); } catch (Exception e) { String message = "Error : "+e; log.error( message, e ); @@ -31,6 +36,41 @@ public void testConfigRead001() { } } + private void templateTesting( FreemarkerDocProcessConfig config ) { + DocProcessContext context = DocProcessContext.newContext( "test", "testString" ); + runTestEx( () -> { + try ( ByteArrayOutputStream baos = new ByteArrayOutputStream() ) { + config.process( "test_01", DocConfig.TYPE_MD, context, baos, false ); + } + } ); + runTestEx( () -> { + try ( ByteArrayOutputStream baos = new ByteArrayOutputStream() ) { + config.process( "test_01_alt", DocConfig.TYPE_MD, context, baos, false ); + } + } ); + runTestEx( () -> { + try ( ByteArrayOutputStream baos = new ByteArrayOutputStream() ) { + // need to make it work in the future! + Assert.assertThrows( NullPointerException.class, () -> { + config.process( "test_01_inline", DocConfig.TYPE_MD, context, baos, false ); + } ); + } + } ); + Assert.assertThrows( ConfigException.class , () -> { + try ( ByteArrayOutputStream baos = new ByteArrayOutputStream() ) { + config.process( "test_01_fail", DocConfig.TYPE_MD, context, baos, false ); + } + } ); + } + + @Test + public void testConfigRead002() { + FreemarkerDocProcessConfig config = + FreemarkerDocProcessConfigFacade.loadConfigSafe( "cl://fj_doc_test/freemarker-doc-process_alt.xml" ); + Assert.assertNotNull( config ); + this.templateTesting(config); + } + @Test public void testConfigValidate001() { try ( Reader xmlReader = new InputStreamReader( ClassHelper.loadFromDefaultClassLoader( "fj_doc_test/freemarker-doc-process.xml" ) ) ) { diff --git a/fj-doc-freemarker/src/test/java/test/org/fugerit/java/doc/freemarker/tool/TestGenerateStub.java b/fj-doc-freemarker/src/test/java/test/org/fugerit/java/doc/freemarker/tool/TestGenerateStub.java new file mode 100644 index 000000000..70a793d52 --- /dev/null +++ b/fj-doc-freemarker/src/test/java/test/org/fugerit/java/doc/freemarker/tool/TestGenerateStub.java @@ -0,0 +1,40 @@ +package test.org.fugerit.java.doc.freemarker.tool; + +import java.io.InputStream; +import java.io.StringWriter; +import java.util.Properties; + +import org.fugerit.java.core.lang.helpers.ClassHelper; +import org.fugerit.java.doc.freemarker.tool.GenerateStub; +import org.junit.Assert; +import org.junit.Test; + +import test.org.fugerit.java.BasicTest; + +public class TestGenerateStub extends BasicTest { + + @Test + public void genTest001() { + runTestEx( () -> { + try ( InputStream is = ClassHelper.loadFromDefaultClassLoader( "generate-stub-test/doc-process-autodoc.xml" ); + StringWriter writer = new StringWriter() ) { + Properties props = new Properties(); + GenerateStub.generate( writer, props, is ); + Assert.assertNotEquals( 0 , writer.toString().length() ); + } + } ); + } + + @Test + public void genTest002() { + runTestEx( () -> { + try (StringWriter writer = new StringWriter() ) { + Properties props = new Properties(); + props.setProperty( GenerateStub.ARG_INPUT_FILE , "src/test/resources/generate-stub-test/doc-process-autodoc.xml" ); + GenerateStub.generate( writer, props ); + Assert.assertNotEquals( 0 , writer.toString().length() ); + } + } ); + } + +} diff --git a/fj-doc-freemarker/src/test/resources/coverage/xml/default_doc.xml b/fj-doc-freemarker/src/test/resources/coverage/xml/default_doc.xml new file mode 100644 index 000000000..9edcd680d --- /dev/null +++ b/fj-doc-freemarker/src/test/resources/coverage/xml/default_doc.xml @@ -0,0 +1,87 @@ + + + + + + 10;10;10;30 + excel-table=print + + Basic example + fj doc venus sample source xml + fugerit79 + en + + true + /css/test.css + + excel-table + + header test + + + test + ${r"${currentPage}"} / ${r"${pageCount}"} + test + + + Test + + + + main title h1 + Test times roman + Courier + Symbol + Symbol + Test default font +
+ + + + Name + Surname + Title + + + + + + + + + + + + + + + + +
+ +
  • test 1
  • +
    + +
  • test 2
  • +
    + +
  • test 3
  • +
    + +
  • test 4
  • +
    + +
  • test 5
  • +
    + +
  • test 6
  • +
    + +
  • test 7
  • +
    + + +
    \ No newline at end of file diff --git a/fj-doc-freemarker/src/test/resources/coverage/xml/default_doc_alt.xml b/fj-doc-freemarker/src/test/resources/coverage/xml/default_doc_alt.xml new file mode 100644 index 000000000..599505217 --- /dev/null +++ b/fj-doc-freemarker/src/test/resources/coverage/xml/default_doc_alt.xml @@ -0,0 +1,65 @@ + + + + + + 10;10;10;30 + excel-table=print + + Basic example + fj doc venus sample source xml + fugerit79 + en + + horizontal + + true + + excel-table +
    + header test +
    +
    + ${r"${currentPage}"} / ${r"${pageCount}"} +
    +
    + + + My sample title + + + Name + Surname + Title + + + + + + + + + + + + + + + +
    + + 1 + 2 + +
    + + + + + + + +
    \ No newline at end of file diff --git a/fj-doc-freemarker/src/test/resources/coverage/xml/default_doc_fail1.xml b/fj-doc-freemarker/src/test/resources/coverage/xml/default_doc_fail1.xml new file mode 100644 index 000000000..f8335b706 --- /dev/null +++ b/fj-doc-freemarker/src/test/resources/coverage/xml/default_doc_fail1.xml @@ -0,0 +1,58 @@ + + + + + + 10;10;10;30 + excel-table=print + + Basic example + fj doc venus sample source xml + fugerit79 + en + + true + /css/test.css + + header test + + + test + ${r"${currentPage}"} / ${r"${pageCount}"} + + + + + Test times roman + Courier + Symbol + Symbol + Test default font + + + Name + Surname + Title + + + + + + + + + + + + + + + + +
    + + +
    \ No newline at end of file diff --git a/fj-doc-freemarker/src/test/resources/fj_doc_test/freemarker-doc-process_alt.xml b/fj-doc-freemarker/src/test/resources/fj_doc_test/freemarker-doc-process_alt.xml new file mode 100644 index 000000000..3afc9ca2c --- /dev/null +++ b/fj-doc-freemarker/src/test/resources/fj_doc_test/freemarker-doc-process_alt.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fj-doc-freemarker/src/test/resources/fj_doc_test/template/test_01.ftl b/fj-doc-freemarker/src/test/resources/fj_doc_test/template/test_01.ftl new file mode 100644 index 000000000..4e041cdee --- /dev/null +++ b/fj-doc-freemarker/src/test/resources/fj_doc_test/template/test_01.ftl @@ -0,0 +1,78 @@ + + + + + + + + + 10;10;10;30 + + + excel-table=print + 450 + + excel-table + + + + ${r"${currentPage}"} / ${r"${pageCount}"} + + + + + + + Heading test level 1 default font + + Heading test level 1 TitilliumWeb + + Heading test level 2 + + Heading test level 3 + + Test right + + ${messageFormat('test format -> {0} {1}', 'param1', 'param2')} + +
    +
    +
    + + Test template page apache free marker + + + + + + + + + + italic ${sumLong(10, 20)} + + + + italic ${messageFormat()} + + bold + + bold italic + + + + Name + Surname + Title + +
    + + +
    \ No newline at end of file diff --git a/fj-doc-freemarker/src/test/resources/generate-stub-test/doc-process-autodoc.xml b/fj-doc-freemarker/src/test/resources/generate-stub-test/doc-process-autodoc.xml new file mode 100644 index 000000000..cc21bc185 --- /dev/null +++ b/fj-doc-freemarker/src/test/resources/generate-stub-test/doc-process-autodoc.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fj-doc-freemarker/src/test/resources/test/img_test_blue.png b/fj-doc-freemarker/src/test/resources/test/img_test_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..557b6e1856d91d114fd78adeea1805c97d55d0bd GIT binary patch literal 864 zcmV-m1E2hfP)WFU8GbZ8()Nlj2>E@cM*00P8GL_t(o!|j;gD`a69 z$3KU`PR5K`?byK@Ev40j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IrZtyjXhi?*P};btZNuXt%bL zotBN;=RVWF8eSzeDU}ja$<=*HdNz8WFU8GbZ8()Nlj2>E@cM*00N;&L_t(o!|j;OE38o* z$3JIYp1};06pal<*-Q~4FDs>#vXW31UXmyq#h-AKm5nkA+bJo<%H$#@>v%r6gr?GX9%#a!6NI+)|RZu@QHPbU3j0^^q0`;JUgZJrcon zevWf{o0Rc!ER~gSd~AQRn`k(Uy{(O>p&>*#95bhMbwM;rR8`~pio86Wi;LL2-q;C` z2Rt5Z<>fdA2f5GBN1mQ0mtxKD2d5LIy*)NEfYRNKK0gm}0Hwo0+6$b%x5q zy5A2M7YJR4>ucoB4%);7kJZ(1cJ?umM0`GMWo1}OOJ4zcd(jUMG1k}P`q-PB0r);V zjEF@3t%~)91&oV}*C=LZV{2+cotjGg5wDl%(-TH87+aUc#lOV&^HD}dJ_aZZ18rso zds`dQ=|t)51S!#GXA}EmWFSK!gp{At2i2)5aJf+0+fjOYp2cx{n{d6nzel*;NFid! zcXtU1K}ZO~4Gn(}P@bG%1OlXd`-Zi!5Y^{-|Bv})Y2#<}8&&|4|1e@OFY2l%+4sLE@H)sC(Fab?K6VL=S0Zl*?@ICth!q@`qogVUW00000NkvXX Hu0mjf9u05P literal 0 HcmV?d00001 diff --git a/fj-doc-freemarker/src/test/resources/test/img_test_teal.jpg b/fj-doc-freemarker/src/test/resources/test/img_test_teal.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a8213e15966822a84443ec9fe182cfbf32c7b75f GIT binary patch literal 10632 zcmeHNcU;rUvft3Fw4gL46a~RR5<-hYL$&&6d*7eWP4@Gf-|o!p%y(yZfB9uN&p5Av^jd3M zYk)xT0TuWGoHxiwtLQ*K0Bmh_fCvDv&V!w@kP3lS7Qqh?@XD=92tnR;C#02U=mU_} zp5ft#G#1KA!s}sJagavB>seR>;{|xKS0UXGt0jX2ZZMpzN&epm``=gO}miGnFG zZ4K8efS9Ja<{^Hf`Jh)^k2b(|{uvL2;JwgKwERz=BlxEE_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$imk9A6;0f^R1H8 F{$IWY;d%f7 literal 0 HcmV?d00001 diff --git a/fj-doc-freemarker/src/test/resources/test/img_test_teal.png b/fj-doc-freemarker/src/test/resources/test/img_test_teal.png new file mode 100644 index 0000000000000000000000000000000000000000..0b9ec03ceaf7e1429b026410f5f17d2fb42cc2c9 GIT binary patch literal 842 zcmV-Q1GW5#P)WFU8GbZ8()Nlj2>E@cM*00OQ_L_t(o!|j;OOH@%9 z#((F|ojZPvj#ikOIRgqoT84>P2|^GFVYrY;p@kX}1Z{%)6Czr*2~@~hN?`^@L{>&+ zpJ0V8YSWCMLWALqAJfdacTNjaQAZ=K!Nq;xZr<}gm)|`v&pB`flXn%HSQ?vLHlPh? z1KNN#pbcmPZZg2bS~kj4&sA5+ikkA&)1Fe6@I~7(h-K8FJoP+Jt4`SCQi8KiAN^^E z`0lPHno-A?`xx)iYq*xOhXY#H3XlFbUo#z-G&&2o5E*7#SWDJg3@>pY7Pk_5y&{#q z^eReq&yso`spOGLg`UlMR}sGOLjo$Yz7coJQPOeHWE3o2P>NQ=OOH85jCjJG>r0!1 z`(%bVHS?DI&;y*4z2t=MQyzZ8x!DiAk`pMU*1v<_;xjz5g0vYvI%Hs>epJt)$l<0n zGDMx8yTaFOcq!FA49W?P%)B5fenSWdA_*$VkPLHO`Zpeuj;NpgdN$?S;;7mTA79KV zo>>zKJq^x$051L io.quarkus quarkus-arc - - - org.fugerit.java - fj-core - - - org.fugerit.java - fj-doc-base - - - org.fugerit.java - fj-doc-base-json - - - org.fugerit.java - fj-doc-base-yaml - - - org.fugerit.java - fj-doc-val - - - org.fugerit.java - fj-doc-mod-fop - - - org.fugerit.java - fj-doc-mod-poi - - - org.fugerit.java - fj-doc-lib-simpletable - - - org.fugerit.java - fj-doc-sample io.quarkus @@ -94,6 +58,26 @@ rest-assured test + + org.fugerit.java + fj-doc-sample + + + xml-apis + xml-apis + + + + + org.fugerit.java + fj-doc-val + + + xml-apis + xml-apis + + + diff --git a/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/RestHelper.java b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/RestHelper.java new file mode 100644 index 000000000..4d082922b --- /dev/null +++ b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/RestHelper.java @@ -0,0 +1,27 @@ +package org.fugerit.java.doc.playground; + +import org.fugerit.java.core.function.UnsafeSupplier; + +import jakarta.ws.rs.core.Response; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class RestHelper { + + private RestHelper() {} + + public static Response defaultHandle( UnsafeSupplier fun ) { + Response res = null; + try { + res = fun.get(); + if ( res == null ) { + res = Response.status(Response.Status.BAD_REQUEST).build(); + } + } catch (Exception e) { + log.info("Error : " + e, e); + res = Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); + } + return res; + } + +} diff --git a/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/catalog/CatalogRest.java b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/catalog/CatalogRest.java index 1672d3fcf..4278f267a 100644 --- a/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/catalog/CatalogRest.java +++ b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/catalog/CatalogRest.java @@ -5,6 +5,7 @@ import org.fugerit.java.core.io.StreamIO; import org.fugerit.java.core.util.collection.OptionItem; +import org.fugerit.java.doc.playground.RestHelper; import org.fugerit.java.doc.playground.convert.ConvertOutput; import org.fugerit.java.doc.sample.facade.DocCatalogSample; @@ -15,9 +16,7 @@ import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; -import lombok.extern.slf4j.Slf4j; -@Slf4j @ApplicationScoped @Path("/catalog") public class CatalogRest { @@ -26,36 +25,26 @@ public class CatalogRest { @Produces(MediaType.APPLICATION_JSON) @Path("/list") public Response catalogList() { - Response res = Response.status(Response.Status.BAD_REQUEST).build(); - try { - res = Response.ok().entity( + return RestHelper.defaultHandle( () -> Response.ok().entity( DocCatalogSample.getInstance().getPlaygroundCoreCatalog() .stream().map( e -> new OptionItem( e.getId(), e.getDescription() ) - ).collect( Collectors.toList() ) - ).build(); - } catch (Exception e) { - log.info("Error : " + e, e); - res = Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); - } - return res; + ).collect( Collectors.toList() ) ).build() + ); } @GET @Produces(MediaType.APPLICATION_JSON) @Path("/entry/{id}") public Response catalogEntry( @PathParam("id") String id ) { - Response res = Response.status(Response.Status.BAD_REQUEST).build(); - DocCatalogSample catalog = DocCatalogSample.getInstance(); - try ( Reader reader = catalog.entryReader( catalog.getPlaygroundCoreCatalog().get( id ) ) ) { - ConvertOutput output = new ConvertOutput(); - output.setDocOutput( StreamIO.readString( reader ) ); - res = Response.ok().entity( output ).build(); - } catch (Exception e) { - log.info("Error : " + e, e); - res = Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); - } - return res; + return RestHelper.defaultHandle( () -> { + DocCatalogSample catalog = DocCatalogSample.getInstance(); + try ( Reader reader = catalog.entryReader( catalog.getPlaygroundCoreCatalog().get( id ) ) ) { + ConvertOutput output = new ConvertOutput(); + output.setDocOutput( StreamIO.readString( reader ) ); + return Response.ok().entity( output ).build(); + } + } ); } } \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/convert/ConvertRest.java b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/convert/ConvertRest.java index bc61e7e0e..fd5d98b51 100644 --- a/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/convert/ConvertRest.java +++ b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/convert/ConvertRest.java @@ -1,10 +1,13 @@ package org.fugerit.java.doc.playground.convert; +import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; +import org.fugerit.java.core.cfg.ConfigException; import org.fugerit.java.doc.json.parse.DocJsonToXml; import org.fugerit.java.doc.json.parse.DocXmlToJson; +import org.fugerit.java.doc.playground.RestHelper; import org.fugerit.java.doc.playground.facade.InputFacade; import com.fasterxml.jackson.databind.JsonNode; @@ -27,7 +30,7 @@ public class ConvertRest { private static final String INVALID_FORMAT_MESSAGE = "Invalid output format : "; - private String handleXml( ConvertOutput output, String docContent, String outputFormat, ObjectMapper yamlMapper ) throws Exception { + private String handleXml( String docContent, String outputFormat, ObjectMapper yamlMapper ) throws IOException, ConfigException { String docOutput = null; if ( InputFacade.FORMAT_JSON.equalsIgnoreCase( outputFormat ) ) { DocXmlToJson helper = new DocXmlToJson(); @@ -41,13 +44,11 @@ private String handleXml( ConvertOutput output, String docContent, String output JsonNode node = helper.convertToJsonNode( reader ); docOutput = yamlMapper.writeValueAsString( node ); } - } else { - output.setMessage( INVALID_FORMAT_MESSAGE+outputFormat ); } return docOutput; } - private String handleJson( ConvertOutput output, String docContent, String outputFormat, ObjectMapper mapper, ObjectMapper yamlMapper ) throws Exception { + private String handleJson( String docContent, String outputFormat, ObjectMapper mapper, ObjectMapper yamlMapper ) throws IOException, ConfigException { String docOutput = null; if ( InputFacade.FORMAT_XML.equalsIgnoreCase( outputFormat ) ) { DocJsonToXml helper = new DocJsonToXml(); @@ -61,13 +62,11 @@ private String handleJson( ConvertOutput output, String docContent, String outpu JsonNode node = mapper.readTree( reader ); docOutput = yamlMapper.writeValueAsString( node ); } - } else { - output.setMessage( INVALID_FORMAT_MESSAGE+outputFormat ); - } + } return docOutput; } - private String handleYaml( ConvertOutput output, String docContent, String outputFormat, ObjectMapper mapper, ObjectMapper yamlMapper ) throws Exception { + private String handleYaml( String docContent, String outputFormat, ObjectMapper mapper, ObjectMapper yamlMapper ) throws IOException, ConfigException { String docOutput = null; if ( InputFacade.FORMAT_XML.equalsIgnoreCase( outputFormat ) ) { DocJsonToXml helper = new DocJsonToXml( yamlMapper ); @@ -81,9 +80,7 @@ private String handleYaml( ConvertOutput output, String docContent, String outpu JsonNode node = yamlMapper.readTree( reader ); docOutput = mapper.writerWithDefaultPrettyPrinter().writeValueAsString( node ); } - } else { - output.setMessage( INVALID_FORMAT_MESSAGE+outputFormat ); - } + } return docOutput; } @@ -92,8 +89,7 @@ private String handleYaml( ConvertOutput output, String docContent, String outpu @Produces(MediaType.APPLICATION_JSON) @Path("/doc") public Response convertDoc( ConvertInput input ) { - Response res = Response.status(Response.Status.BAD_REQUEST).build(); - try { + return RestHelper.defaultHandle( () -> { ConvertOutput output = new ConvertOutput(); String inputFormat = input.getInputFormat(); String outputFormat = input.getOutputFormat(); @@ -102,24 +98,26 @@ public Response convertDoc( ConvertInput input ) { log.info( "format input : {} -> output : {}", inputFormat, outputFormat ); ObjectMapper mapper = new ObjectMapper(); ObjectMapper yamlMapper = new ObjectMapper( new YAMLFactory() ); - if ( InputFacade.FORMAT_XML.equalsIgnoreCase( inputFormat ) ) { - docOutput = this.handleXml(output, docContent, outputFormat, yamlMapper); - } else if ( InputFacade.FORMAT_JSON.equalsIgnoreCase( inputFormat ) ) { - docOutput = this.handleJson(output, docContent, outputFormat, mapper, yamlMapper); - } else if ( InputFacade.FORMAT_YAML.equalsIgnoreCase( inputFormat ) ) { - docOutput = this.handleYaml(output, docContent, outputFormat, mapper, yamlMapper); + if ( InputFacade.FORMAT_LIST.contains( outputFormat ) ) { + if ( InputFacade.FORMAT_XML.equalsIgnoreCase( inputFormat ) ) { + docOutput = this.handleXml( docContent, outputFormat, yamlMapper); + } else if ( InputFacade.FORMAT_JSON.equalsIgnoreCase( inputFormat ) ) { + docOutput = this.handleJson( docContent, outputFormat, mapper, yamlMapper); + } else if ( InputFacade.FORMAT_YAML.equalsIgnoreCase( inputFormat ) ) { + docOutput = this.handleYaml( docContent, outputFormat, mapper, yamlMapper); + } + } else { + output.setMessage( INVALID_FORMAT_MESSAGE+outputFormat ); } + Response res = null; if ( docOutput != null ) { output.setDocOutput(docOutput); res = Response.ok().entity( output ).build(); } else { res = Response.status(Response.Status.BAD_REQUEST).entity( output ).build(); } - } catch (Exception e) { - log.info("Error : " + e, e); - res = Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); - } - return res; + return res; + } ); } } \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/doc/GenerateRest.java b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/doc/GenerateRest.java index 3fe26822c..6ce979847 100644 --- a/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/doc/GenerateRest.java +++ b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/doc/GenerateRest.java @@ -19,6 +19,7 @@ import org.fugerit.java.doc.lib.simpletable.model.SimpleRow; import org.fugerit.java.doc.lib.simpletable.model.SimpleTable; import org.fugerit.java.doc.mod.poi.XlsxPoiTypeHandler; +import org.fugerit.java.doc.playground.RestHelper; import org.fugerit.java.doc.playground.config.InitPlayground; import org.fugerit.java.doc.playground.facade.BasicInput; import org.fugerit.java.doc.playground.facade.InputFacade; @@ -86,20 +87,15 @@ private DocParser findParser( BasicInput input ) { @Produces(MediaType.APPLICATION_JSON) @Path("/document") public Response document( GenerateInput input) { - Response res = Response.status(Response.Status.BAD_REQUEST).build(); - try { + return RestHelper.defaultHandle( () -> { long time = System.currentTimeMillis(); DocTypeHandler handler = this.findHandler(input); byte[] data = this.generateHelper(input, handler); GenerateOutput output = new GenerateOutput(); output.setDocOutputBase64( Base64.getEncoder().encodeToString( data ) ); output.setGenerationTime( CheckpointUtils.formatTimeDiffMillis( time , System.currentTimeMillis() ) ); - res = Response.ok().entity( output ).build(); - } catch (Exception e) { - log.info("Error : " + e, e); - res = Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); - } - return res; + return Response.ok().entity( output ).build(); + } ); } private void addRow( SimpleTable simpleTableModel, int count, String level, String message ) { @@ -119,8 +115,7 @@ private void addRow( SimpleTable simpleTableModel, int count, String level, Stri @Produces(MediaType.APPLICATION_JSON) @Path("/validate") public Response validate( GenerateInput input) { - Response res = Response.status(Response.Status.BAD_REQUEST).build(); - try { + return RestHelper.defaultHandle( () -> { DocParser parser = this.findParser(input); try ( StringReader reader = new StringReader( input.getDocContent() ); ByteArrayOutputStream buffer = new ByteArrayOutputStream() ) { @@ -146,13 +141,10 @@ public Response validate( GenerateInput input) { docConfig.processSimpleTable(simpleTableModel, handler, buffer); GenerateOutput output = new GenerateOutput(); output.setDocOutputBase64( Base64.getEncoder().encodeToString( buffer.toByteArray() ) ); - res = Response.ok().entity( output ).build(); + return Response.ok().entity( output ).build(); } - } catch (Exception e) { - log.info("Error : " + e, e); - res = Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); } - return res; + ); } } \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/facade/InputFacade.java b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/facade/InputFacade.java index 87fbd17f3..8c20f9782 100644 --- a/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/facade/InputFacade.java +++ b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/facade/InputFacade.java @@ -1,5 +1,9 @@ package org.fugerit.java.doc.playground.facade; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + public class InputFacade { private InputFacade() {} @@ -8,4 +12,8 @@ private InputFacade() {} public static final String FORMAT_JSON = "JSON"; public static final String FORMAT_YAML = "YAML"; + protected static final String[] FORMATS_A = { FORMAT_XML, FORMAT_JSON, FORMAT_YAML }; + + public static final List FORMAT_LIST = Collections.unmodifiableList( Arrays.asList( FORMATS_A ) ); + } diff --git a/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/meta/MetaRest.java b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/meta/MetaRest.java index 734f173ec..b987fa43e 100644 --- a/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/meta/MetaRest.java +++ b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/meta/MetaRest.java @@ -3,6 +3,7 @@ import java.util.Properties; import org.fugerit.java.core.util.PropsIO; +import org.fugerit.java.doc.playground.RestHelper; import jakarta.enterprise.context.ApplicationScoped; import jakarta.ws.rs.GET; @@ -10,9 +11,7 @@ import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; -import lombok.extern.slf4j.Slf4j; -@Slf4j @ApplicationScoped @Path("/meta") public class MetaRest { @@ -21,15 +20,10 @@ public class MetaRest { @Produces(MediaType.APPLICATION_JSON) @Path("/version") public Response getVersion() { - Response res = Response.status(Response.Status.BAD_REQUEST).build(); - try { + return RestHelper.defaultHandle( () -> { Properties buildProps = PropsIO.loadFromClassLoader( "build.properties" ); - res = Response.ok().entity( buildProps ).build(); - } catch (Exception e) { - log.info("Error : " + e, e); - res = Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); - } - return res; + return Response.ok().entity( buildProps ).build(); + } ); } } \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/val/ValRest.java b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/val/ValRest.java index dd34caaac..2eec8810a 100644 --- a/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/val/ValRest.java +++ b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/val/ValRest.java @@ -2,6 +2,7 @@ import java.io.FileInputStream; +import org.fugerit.java.doc.playground.RestHelper; import org.fugerit.java.doc.val.core.DocTypeValidationResult; import org.fugerit.java.doc.val.core.DocValidatorFacade; import org.fugerit.java.doc.val.core.basic.ImageValidator; @@ -36,23 +37,19 @@ public class ValRest { @Produces(MediaType.APPLICATION_JSON) @Path("/check") public Response check( ValInput input) { - Response res = Response.status(Response.Status.BAD_REQUEST).build(); - try { + return RestHelper.defaultHandle( () -> { ValOutput output = null; FileUpload file = input.getFile(); - if ( file != null) { - log.info( "file -> {} -> {}", file.fileName(), file.uploadedFile() ); - try ( FileInputStream fis = new FileInputStream( file.uploadedFile().toFile() ) ) { - DocTypeValidationResult result = facade.validate( file.fileName(), fis ); - if (result.isResultOk()) { - output = new ValOutput(true, "Input is valid"); - } else { - output = new ValOutput(false, "Input is not valid"); - } - } - } else { - output = new ValOutput(false, "No input provided"); + log.info( "file -> {} -> {}", file.fileName(), file.uploadedFile() ); + try ( FileInputStream fis = new FileInputStream( file.uploadedFile().toFile() ) ) { + DocTypeValidationResult result = facade.validate( file.fileName(), fis ); + if (result.isResultOk()) { + output = new ValOutput(true, "Input is valid"); + } else { + output = new ValOutput(false, "Input is not valid"); + } } + Response res = null; if (output != null) { if (output.isValid()) { res = Response.ok().entity(output).build(); @@ -60,11 +57,8 @@ public Response check( ValInput input) { res = Response.status(Response.Status.BAD_REQUEST).entity(output).build(); } } - } catch (Exception e) { - log.info("Error : " + e, e); - res = Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); - } - return res; + return res; + } ); } @GET diff --git a/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/GreetingResourceTest.java b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/GreetingResourceTest.java index a0f382eca..b1389aeb0 100644 --- a/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/GreetingResourceTest.java +++ b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/GreetingResourceTest.java @@ -1,11 +1,12 @@ package org.fugerit.java; -import io.quarkus.test.junit.QuarkusTest; -import org.junit.jupiter.api.Test; - import static io.restassured.RestAssured.given; import static org.hamcrest.CoreMatchers.is; +import org.junit.jupiter.api.Test; + +import io.quarkus.test.junit.QuarkusTest; + @QuarkusTest class GreetingResourceTest { diff --git a/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/CatalogRestTest.java b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/CatalogRestTest.java new file mode 100644 index 000000000..f56d83171 --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/CatalogRestTest.java @@ -0,0 +1,31 @@ +package org.fugerit.java.doc.playground; + +import static io.restassured.RestAssured.given; + +import org.fugerit.java.TestConsts; +import org.junit.jupiter.api.Test; + +import io.quarkus.test.junit.QuarkusTest; + +@QuarkusTest +class CatalogRestTest { + + @Test + void testList() { + given() + .when() + .get( TestConsts.BASE_API_PATH+"/catalog/list" ) + .then() + .statusCode(200); + } + + @Test + void testEntry() { + given() + .when() + .get( TestConsts.BASE_API_PATH+"/catalog/entry/default" ) + .then() + .statusCode(200); + } + +} \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ConvertRestTest.java b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ConvertRestTest.java new file mode 100644 index 000000000..5ede7db1c --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ConvertRestTest.java @@ -0,0 +1,54 @@ +package org.fugerit.java.doc.playground; + +import static io.restassured.RestAssured.given; + +import org.fugerit.java.TestConsts; +import org.fugerit.java.core.function.SafeFunction; +import org.fugerit.java.core.io.StreamIO; +import org.fugerit.java.core.lang.helpers.ClassHelper; +import org.junit.jupiter.api.Test; + +import io.quarkus.test.junit.QuarkusTest; +import jakarta.ws.rs.core.MediaType; +import lombok.extern.slf4j.Slf4j; + +@QuarkusTest +@Slf4j +class ConvertRestTest { + + private byte[] getInput( String path ) { + return SafeFunction.get( () -> { + String json = StreamIO.readString( ClassHelper.loadFromDefaultClassLoader( "request/payload/"+path ) ); + log.info( "payload : {}", json ); + return json.getBytes(); + } ); + } + + private void testWorker( String apiPath, String jsonPayloadPath, int code ) { + given() + .when() + .accept( MediaType.APPLICATION_JSON ) + .contentType( MediaType.APPLICATION_JSON ) + .body( getInput( jsonPayloadPath ) ) + .post( TestConsts.BASE_API_PATH+apiPath ) + .then() + .statusCode(code); + } + + @Test + void testConvertDocument200() { + int[] testId = { 1, 2, 3, 6, 7, 8 }; + for ( int k=0; k { + String json = StreamIO.readString( ClassHelper.loadFromDefaultClassLoader( "request/payload/"+path ) ); + log.info( "payload : {}", json ); + return json.getBytes(); + } ); + } + + private void testWorker( String apiPath, String jsonPayloadPath ) { + given() + .when() + .accept( MediaType.APPLICATION_JSON ) + .contentType( MediaType.APPLICATION_JSON ) + .body( getInput( jsonPayloadPath ) ) + .post( TestConsts.BASE_API_PATH+apiPath ) + .then() + .statusCode(200); + } + + @Test + void testGenerateDocument() { + int[] testId = { 1, 2, 3, 4, 5, 6 }; + for ( int k=0; k { throw new IOException( "scenario exception" ); } ).getStatus() ); + } + + @Test + void test400() { + Assertions.assertEquals( Response.Status.BAD_REQUEST.getStatusCode(), + RestHelper.defaultHandle( () -> null ).getStatus() ); + } + +} diff --git a/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValRestIT.java b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValRestIT.java deleted file mode 100644 index 0e9959f30..000000000 --- a/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValRestIT.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.fugerit.java.doc.playground; - -import io.quarkus.test.junit.QuarkusIntegrationTest; - -@QuarkusIntegrationTest -public class ValRestIT extends ValRestTest { - // Execute the same tests but in packaged mode. -} diff --git a/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValRestTest.java b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValRestTest.java index 7cea3358d..71dd7b53e 100644 --- a/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValRestTest.java +++ b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValRestTest.java @@ -1,23 +1,62 @@ package org.fugerit.java.doc.playground; -import io.quarkus.test.junit.QuarkusTest; -import org.junit.jupiter.api.Test; - import static io.restassured.RestAssured.given; import static org.hamcrest.CoreMatchers.is; import org.fugerit.java.TestConsts; +import org.fugerit.java.core.function.SafeFunction; +import org.fugerit.java.core.io.StreamIO; +import org.fugerit.java.core.lang.helpers.ClassHelper; +import org.fugerit.java.doc.playground.val.ValInput; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import io.quarkus.test.junit.QuarkusTest; @QuarkusTest class ValRestTest { + private byte[] getInput( String path ) { + return SafeFunction.get( () -> { + String json = StreamIO.readString( ClassHelper.loadFromDefaultClassLoader( "request/payload/"+path ) ); + return json.getBytes(); + } ); + } + @Test - void testHelloEndpoint() { + void testSupportedExcentions() { given() .when().get( TestConsts.BASE_API_PATH+"/val/supported_extensions" ) .then() .statusCode(200) .body(is("[\"JPG\",\"TIF\",\"DOCX\",\"XLSX\",\"TIFF\",\"PDF\",\"PNG\",\"DOC\",\"JPEG\",\"XLS\"]")); } - + + @Test + void testValidation200() { + given() + .when() + .multiPart( "file", "pdf_as_pdf.pdf", getInput( "val/pdf_as_pdf.pdf" ) ) + .post( TestConsts.BASE_API_PATH+"/val/check" ) + .then() + .statusCode(200); + } + + @Test + void testValidation400() { + given() + .when() + .multiPart( "file", "png_as_pdf.pdf", getInput( "val/png_as_pdf.pdf" ) ) + .post( TestConsts.BASE_API_PATH+"/val/check" ) + .then() + .statusCode(400); + } + + @Test + void testInput() { + ValInput input = new ValInput(); + input.setFile( null ); + Assertions.assertNull( input.getFile() ); + } + } \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_01.json b/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_01.json new file mode 100644 index 000000000..4f7232527 --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_01.json @@ -0,0 +1,5 @@ +{ + "inputFormat": "XML", + "outputFormat":"JSON", + "docContent":"\n \n\n \n \t\n \t10;10;10;30 \n \texcel-table=print\n \t\n\tBasic example\n\tfj doc venus sample source xml\n\tfugerit79\n\ten\n\t\n\tTitilliumWeb\n\t\n\t\t${r\"${currentPage}\"} / ${r\"${pageCount}\"}\n\t\n \n \n \t\tMy sample title\n \t\n \t\t\n \t\t\tName\n \t\t\tSurname\n \t\t\tTitle\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t \t\n \t
    \n \n \n" +} \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_02.json b/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_02.json new file mode 100644 index 000000000..7d8b00a56 --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_02.json @@ -0,0 +1,5 @@ +{ + "inputFormat": "JSON", + "outputFormat":"YAML", + "docContent":"{\n \"xmlns\" : \"http://javacoredoc.fugerit.org\",\n \"xsi:schemaLocation\" : \"http://javacoredoc.fugerit.org https://www.fugerit.org/data/java/doc/xsd/doc-2-0.xsd\",\n \"xmlns:xsi\" : \"http://www.w3.org/2001/XMLSchema-instance\",\n \"_t\" : \"doc\",\n \"_e\" : [ {\n \"_t\" : \"metadata\",\n \"_e\" : [ {\n \"name\" : \"margins\",\n \"_t\" : \"info\",\n \"_v\" : \"10;10;10;30\"\n }, {\n \"name\" : \"excel-table-id\",\n \"_t\" : \"info\",\n \"_v\" : \"excel-table=print\"\n }, {\n \"name\" : \"doc-title\",\n \"_t\" : \"info\",\n \"_v\" : \"Basic example\"\n }, {\n \"name\" : \"doc-subject\",\n \"_t\" : \"info\",\n \"_v\" : \"fj doc venus sample source xml\"\n }, {\n \"name\" : \"doc-author\",\n \"_t\" : \"info\",\n \"_v\" : \"fugerit79\"\n }, {\n \"name\" : \"doc-language\",\n \"_t\" : \"info\",\n \"_v\" : \"en\"\n }, {\n \"name\" : \"default-font-name\",\n \"_t\" : \"info\",\n \"_v\" : \"TitilliumWeb\"\n }, {\n \"_t\" : \"footer-ext\",\n \"_e\" : [ {\n \"align\" : \"right\",\n \"_t\" : \"para\",\n \"_v\" : \"${r\\\"${currentPage}\\\"} / ${r\\\"${pageCount}\\\"}\"\n } ]\n } ]\n }, {\n \"_t\" : \"body\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"My sample title\"\n }, {\n \"padding\" : \"2\",\n \"columns\" : \"3\",\n \"width\" : \"100\",\n \"id\" : \"excel-table\",\n \"colwidths\" : \"30;30;40\",\n \"_t\" : \"table\",\n \"_e\" : [ {\n \"_t\" : \"row\",\n \"_e\" : [ {\n \"border-color\" : \"#000000\",\n \"border-width\" : \"1\",\n \"align\" : \"center\",\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"style\" : \"bold\",\n \"_t\" : \"para\",\n \"_v\" : \"Name\"\n } ]\n }, {\n \"align\" : \"center\",\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"style\" : \"bold\",\n \"_t\" : \"para\",\n \"_v\" : \"Surname\"\n } ]\n }, {\n \"align\" : \"center\",\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"style\" : \"bold\",\n \"_t\" : \"para\",\n \"_v\" : \"Title\"\n } ]\n } ]\n }, {\n \"_t\" : \"row\",\n \"_e\" : [ {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"Luthien\"\n } ]\n }, {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"Tinuviel\"\n } ]\n }, {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"Queen\"\n } ]\n } ]\n }, {\n \"_t\" : \"row\",\n \"_e\" : [ {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"Thorin\"\n } ]\n }, {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"Oakshield\"\n } ]\n }, {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"King\"\n } ]\n } ]\n } ]\n } ]\n } ]\n}" +} \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_03.json b/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_03.json new file mode 100644 index 000000000..d04f9c969 --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_03.json @@ -0,0 +1,5 @@ +{ + "inputFormat": "YAML", + "outputFormat":"XML", + "docContent":"---\nxmlns: \"http://javacoredoc.fugerit.org\"\nxsi:schemaLocation: \"http://javacoredoc.fugerit.org https://www.fugerit.org/data/java/doc/xsd/doc-2-0.xsd\"\nxmlns:xsi: \"http://www.w3.org/2001/XMLSchema-instance\"\n_t: \"doc\"\n_e:\n- _t: \"metadata\"\n _e:\n - name: \"margins\"\n _t: \"info\"\n _v: \"10;10;10;30\"\n - name: \"excel-table-id\"\n _t: \"info\"\n _v: \"excel-table=print\"\n - name: \"doc-title\"\n _t: \"info\"\n _v: \"Basic example\"\n - name: \"doc-subject\"\n _t: \"info\"\n _v: \"fj doc venus sample source xml\"\n - name: \"doc-author\"\n _t: \"info\"\n _v: \"fugerit79\"\n - name: \"doc-language\"\n _t: \"info\"\n _v: \"en\"\n - name: \"default-font-name\"\n _t: \"info\"\n _v: \"TitilliumWeb\"\n - _t: \"footer-ext\"\n _e:\n - align: \"right\"\n _t: \"para\"\n _v: \"${r\\\"${currentPage}\\\"} / ${r\\\"${pageCount}\\\"}\"\n- _t: \"body\"\n _e:\n - _t: \"para\"\n _v: \"My sample title\"\n - padding: \"2\"\n columns: \"3\"\n width: \"100\"\n id: \"excel-table\"\n colwidths: \"30;30;40\"\n _t: \"table\"\n _e:\n - _t: \"row\"\n _e:\n - border-color: \"#000000\"\n border-width: \"1\"\n align: \"center\"\n _t: \"cell\"\n _e:\n - style: \"bold\"\n _t: \"para\"\n _v: \"Name\"\n - align: \"center\"\n _t: \"cell\"\n _e:\n - style: \"bold\"\n _t: \"para\"\n _v: \"Surname\"\n - align: \"center\"\n _t: \"cell\"\n _e:\n - style: \"bold\"\n _t: \"para\"\n _v: \"Title\"\n - _t: \"row\"\n _e:\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Luthien\"\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Tinuviel\"\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Queen\"\n - _t: \"row\"\n _e:\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Thorin\"\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Oakshield\"\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"King\"\n" +} \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_04.json b/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_04.json new file mode 100644 index 000000000..d6da6378a --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_04.json @@ -0,0 +1,5 @@ +{ + "inputFormat": "INVALID", + "outputFormat":"XML", + "" +} \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_05.json b/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_05.json new file mode 100644 index 000000000..d245acb2b --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_05.json @@ -0,0 +1,5 @@ +{ + "inputFormat": "YAML", + "outputFormat":"INVALID", + "docContent":"---\nxmlns: \"http://javacoredoc.fugerit.org\"\nxsi:schemaLocation: \"http://javacoredoc.fugerit.org https://www.fugerit.org/data/java/doc/xsd/doc-2-0.xsd\"\nxmlns:xsi: \"http://www.w3.org/2001/XMLSchema-instance\"\n_t: \"doc\"\n_e:\n- _t: \"metadata\"\n _e:\n - name: \"margins\"\n _t: \"info\"\n _v: \"10;10;10;30\"\n - name: \"excel-table-id\"\n _t: \"info\"\n _v: \"excel-table=print\"\n - name: \"doc-title\"\n _t: \"info\"\n _v: \"Basic example\"\n - name: \"doc-subject\"\n _t: \"info\"\n _v: \"fj doc venus sample source xml\"\n - name: \"doc-author\"\n _t: \"info\"\n _v: \"fugerit79\"\n - name: \"doc-language\"\n _t: \"info\"\n _v: \"en\"\n - name: \"default-font-name\"\n _t: \"info\"\n _v: \"TitilliumWeb\"\n - _t: \"footer-ext\"\n _e:\n - align: \"right\"\n _t: \"para\"\n _v: \"${r\\\"${currentPage}\\\"} / ${r\\\"${pageCount}\\\"}\"\n- _t: \"body\"\n _e:\n - _t: \"para\"\n _v: \"My sample title\"\n - padding: \"2\"\n columns: \"3\"\n width: \"100\"\n id: \"excel-table\"\n colwidths: \"30;30;40\"\n _t: \"table\"\n _e:\n - _t: \"row\"\n _e:\n - border-color: \"#000000\"\n border-width: \"1\"\n align: \"center\"\n _t: \"cell\"\n _e:\n - style: \"bold\"\n _t: \"para\"\n _v: \"Name\"\n - align: \"center\"\n _t: \"cell\"\n _e:\n - style: \"bold\"\n _t: \"para\"\n _v: \"Surname\"\n - align: \"center\"\n _t: \"cell\"\n _e:\n - style: \"bold\"\n _t: \"para\"\n _v: \"Title\"\n - _t: \"row\"\n _e:\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Luthien\"\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Tinuviel\"\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Queen\"\n - _t: \"row\"\n _e:\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Thorin\"\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Oakshield\"\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"King\"\n" +} \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_06.json b/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_06.json new file mode 100644 index 000000000..72bbe2c18 --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_06.json @@ -0,0 +1,5 @@ +{ + "inputFormat": "XML", + "outputFormat":"YAML", + "docContent":"\n \n\n \n \t\n \t10;10;10;30 \n \texcel-table=print\n \t\n\tBasic example\n\tfj doc venus sample source xml\n\tfugerit79\n\ten\n\t\n\tTitilliumWeb\n\t\n\t\t${r\"${currentPage}\"} / ${r\"${pageCount}\"}\n\t\n \n \n \t\tMy sample title\n \t\n \t\t\n \t\t\tName\n \t\t\tSurname\n \t\t\tTitle\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t \t\n \t
    \n \n \n" +} \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_07.json b/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_07.json new file mode 100644 index 000000000..641baa9a1 --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_07.json @@ -0,0 +1,5 @@ +{ + "inputFormat": "JSON", + "outputFormat":"XML", + "docContent":"{\n \"xmlns\" : \"http://javacoredoc.fugerit.org\",\n \"xsi:schemaLocation\" : \"http://javacoredoc.fugerit.org https://www.fugerit.org/data/java/doc/xsd/doc-2-0.xsd\",\n \"xmlns:xsi\" : \"http://www.w3.org/2001/XMLSchema-instance\",\n \"_t\" : \"doc\",\n \"_e\" : [ {\n \"_t\" : \"metadata\",\n \"_e\" : [ {\n \"name\" : \"margins\",\n \"_t\" : \"info\",\n \"_v\" : \"10;10;10;30\"\n }, {\n \"name\" : \"excel-table-id\",\n \"_t\" : \"info\",\n \"_v\" : \"excel-table=print\"\n }, {\n \"name\" : \"doc-title\",\n \"_t\" : \"info\",\n \"_v\" : \"Basic example\"\n }, {\n \"name\" : \"doc-subject\",\n \"_t\" : \"info\",\n \"_v\" : \"fj doc venus sample source xml\"\n }, {\n \"name\" : \"doc-author\",\n \"_t\" : \"info\",\n \"_v\" : \"fugerit79\"\n }, {\n \"name\" : \"doc-language\",\n \"_t\" : \"info\",\n \"_v\" : \"en\"\n }, {\n \"name\" : \"default-font-name\",\n \"_t\" : \"info\",\n \"_v\" : \"TitilliumWeb\"\n }, {\n \"_t\" : \"footer-ext\",\n \"_e\" : [ {\n \"align\" : \"right\",\n \"_t\" : \"para\",\n \"_v\" : \"${r\\\"${currentPage}\\\"} / ${r\\\"${pageCount}\\\"}\"\n } ]\n } ]\n }, {\n \"_t\" : \"body\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"My sample title\"\n }, {\n \"padding\" : \"2\",\n \"columns\" : \"3\",\n \"width\" : \"100\",\n \"id\" : \"excel-table\",\n \"colwidths\" : \"30;30;40\",\n \"_t\" : \"table\",\n \"_e\" : [ {\n \"_t\" : \"row\",\n \"_e\" : [ {\n \"border-color\" : \"#000000\",\n \"border-width\" : \"1\",\n \"align\" : \"center\",\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"style\" : \"bold\",\n \"_t\" : \"para\",\n \"_v\" : \"Name\"\n } ]\n }, {\n \"align\" : \"center\",\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"style\" : \"bold\",\n \"_t\" : \"para\",\n \"_v\" : \"Surname\"\n } ]\n }, {\n \"align\" : \"center\",\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"style\" : \"bold\",\n \"_t\" : \"para\",\n \"_v\" : \"Title\"\n } ]\n } ]\n }, {\n \"_t\" : \"row\",\n \"_e\" : [ {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"Luthien\"\n } ]\n }, {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"Tinuviel\"\n } ]\n }, {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"Queen\"\n } ]\n } ]\n }, {\n \"_t\" : \"row\",\n \"_e\" : [ {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"Thorin\"\n } ]\n }, {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"Oakshield\"\n } ]\n }, {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"King\"\n } ]\n } ]\n } ]\n } ]\n } ]\n}" +} \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_08.json b/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_08.json new file mode 100644 index 000000000..a1ecd3d39 --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/resources/request/payload/convert/test_convert_input_08.json @@ -0,0 +1,5 @@ +{ + "inputFormat": "YAML", + "outputFormat":"JSON", + "docContent":"---\nxmlns: \"http://javacoredoc.fugerit.org\"\nxsi:schemaLocation: \"http://javacoredoc.fugerit.org https://www.fugerit.org/data/java/doc/xsd/doc-2-0.xsd\"\nxmlns:xsi: \"http://www.w3.org/2001/XMLSchema-instance\"\n_t: \"doc\"\n_e:\n- _t: \"metadata\"\n _e:\n - name: \"margins\"\n _t: \"info\"\n _v: \"10;10;10;30\"\n - name: \"excel-table-id\"\n _t: \"info\"\n _v: \"excel-table=print\"\n - name: \"doc-title\"\n _t: \"info\"\n _v: \"Basic example\"\n - name: \"doc-subject\"\n _t: \"info\"\n _v: \"fj doc venus sample source xml\"\n - name: \"doc-author\"\n _t: \"info\"\n _v: \"fugerit79\"\n - name: \"doc-language\"\n _t: \"info\"\n _v: \"en\"\n - name: \"default-font-name\"\n _t: \"info\"\n _v: \"TitilliumWeb\"\n - _t: \"footer-ext\"\n _e:\n - align: \"right\"\n _t: \"para\"\n _v: \"${r\\\"${currentPage}\\\"} / ${r\\\"${pageCount}\\\"}\"\n- _t: \"body\"\n _e:\n - _t: \"para\"\n _v: \"My sample title\"\n - padding: \"2\"\n columns: \"3\"\n width: \"100\"\n id: \"excel-table\"\n colwidths: \"30;30;40\"\n _t: \"table\"\n _e:\n - _t: \"row\"\n _e:\n - border-color: \"#000000\"\n border-width: \"1\"\n align: \"center\"\n _t: \"cell\"\n _e:\n - style: \"bold\"\n _t: \"para\"\n _v: \"Name\"\n - align: \"center\"\n _t: \"cell\"\n _e:\n - style: \"bold\"\n _t: \"para\"\n _v: \"Surname\"\n - align: \"center\"\n _t: \"cell\"\n _e:\n - style: \"bold\"\n _t: \"para\"\n _v: \"Title\"\n - _t: \"row\"\n _e:\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Luthien\"\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Tinuviel\"\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Queen\"\n - _t: \"row\"\n _e:\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Thorin\"\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Oakshield\"\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"King\"\n" +} \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_01.json b/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_01.json new file mode 100644 index 000000000..f75ccbe9e --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_01.json @@ -0,0 +1,5 @@ +{ + "inputFormat": "XML", + "outputFormat":"HTML", + "docContent":"\n \n\n \n \t\n \t10;10;10;30 \n \texcel-table=print\n \t\n\tBasic example\n\tfj doc venus sample source xml\n\tfugerit79\n\ten\n\t\n\tTitilliumWeb\n\t\n\t\t${r\"${currentPage}\"} / ${r\"${pageCount}\"}\n\t\n \n \n \t\tMy sample title\n \t\n \t\t\n \t\t\tName\n \t\t\tSurname\n \t\t\tTitle\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t \t\n \t
    \n \n \n" +} \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_02.json b/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_02.json new file mode 100644 index 000000000..99b99b92c --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_02.json @@ -0,0 +1,5 @@ +{ + "inputFormat": "XML", + "outputFormat":"XLSX", + "docContent":"\n \n\n \n \t\n \t10;10;10;30 \n \texcel-table=print\n \t\n\tBasic example\n\tfj doc venus sample source xml\n\tfugerit79\n\ten\n\t\n\tTitilliumWeb\n\t\n\t\t${r\"${currentPage}\"} / ${r\"${pageCount}\"}\n\t\n \n \n \t\tMy sample title\n \t\n \t\t\n \t\t\tName\n \t\t\tSurname\n \t\t\tTitle\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t \t\n \t
    \n \n \n" +} \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_03.json b/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_03.json new file mode 100644 index 000000000..382a7bfa3 --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_03.json @@ -0,0 +1,5 @@ +{ + "inputFormat": "XML", + "outputFormat":"PDF", + "docContent":"\n \n\n \n \t\n \t10;10;10;30 \n \texcel-table=print\n \t\n\tBasic example\n\tfj doc venus sample source xml\n\tfugerit79\n\ten\n\t\n\tTitilliumWeb\n\t\n\t\t${r\"${currentPage}\"} / ${r\"${pageCount}\"}\n\t\n \n \n \t\tMy sample title\n \t\n \t\t\n \t\t\tName\n \t\t\tSurname\n \t\t\tTitle\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t \t\n \t
    \n \n \n" +} \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_04.json b/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_04.json new file mode 100644 index 000000000..1854bda12 --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_04.json @@ -0,0 +1,5 @@ +{ + "inputFormat": "XML", + "outputFormat":"PDFA", + "docContent":"\n \n\n \n \t\n \t10;10;10;30 \n \texcel-table=print\n \t\n\tBasic example\n\tfj doc venus sample source xml\n\tfugerit79\n\ten\n\t\n\tTitilliumWeb\n\t\n\t\t${r\"${currentPage}\"} / ${r\"${pageCount}\"}\n\t\n \n \n \t\tMy sample title\n \t\n \t\t\n \t\t\tName\n \t\t\tSurname\n \t\t\tTitle\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t \t\n \t
    \n \n \n" +} \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_05.json b/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_05.json new file mode 100644 index 000000000..70f04ddfe --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_05.json @@ -0,0 +1,5 @@ +{ + "inputFormat": "JSON", + "outputFormat":"HTML", + "docContent":"{\n \"xmlns\" : \"http://javacoredoc.fugerit.org\",\n \"xsi:schemaLocation\" : \"http://javacoredoc.fugerit.org https://www.fugerit.org/data/java/doc/xsd/doc-2-0.xsd\",\n \"xmlns:xsi\" : \"http://www.w3.org/2001/XMLSchema-instance\",\n \"_t\" : \"doc\",\n \"_e\" : [ {\n \"_t\" : \"metadata\",\n \"_e\" : [ {\n \"name\" : \"margins\",\n \"_t\" : \"info\",\n \"_v\" : \"10;10;10;30\"\n }, {\n \"name\" : \"excel-table-id\",\n \"_t\" : \"info\",\n \"_v\" : \"excel-table=print\"\n }, {\n \"name\" : \"doc-title\",\n \"_t\" : \"info\",\n \"_v\" : \"Basic example\"\n }, {\n \"name\" : \"doc-subject\",\n \"_t\" : \"info\",\n \"_v\" : \"fj doc venus sample source xml\"\n }, {\n \"name\" : \"doc-author\",\n \"_t\" : \"info\",\n \"_v\" : \"fugerit79\"\n }, {\n \"name\" : \"doc-language\",\n \"_t\" : \"info\",\n \"_v\" : \"en\"\n }, {\n \"name\" : \"default-font-name\",\n \"_t\" : \"info\",\n \"_v\" : \"TitilliumWeb\"\n }, {\n \"_t\" : \"footer-ext\",\n \"_e\" : [ {\n \"align\" : \"right\",\n \"_t\" : \"para\",\n \"_v\" : \"${r\\\"${currentPage}\\\"} / ${r\\\"${pageCount}\\\"}\"\n } ]\n } ]\n }, {\n \"_t\" : \"body\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"My sample title\"\n }, {\n \"padding\" : \"2\",\n \"columns\" : \"3\",\n \"width\" : \"100\",\n \"id\" : \"excel-table\",\n \"colwidths\" : \"30;30;40\",\n \"_t\" : \"table\",\n \"_e\" : [ {\n \"_t\" : \"row\",\n \"_e\" : [ {\n \"border-color\" : \"#000000\",\n \"border-width\" : \"1\",\n \"align\" : \"center\",\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"style\" : \"bold\",\n \"_t\" : \"para\",\n \"_v\" : \"Name\"\n } ]\n }, {\n \"align\" : \"center\",\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"style\" : \"bold\",\n \"_t\" : \"para\",\n \"_v\" : \"Surname\"\n } ]\n }, {\n \"align\" : \"center\",\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"style\" : \"bold\",\n \"_t\" : \"para\",\n \"_v\" : \"Title\"\n } ]\n } ]\n }, {\n \"_t\" : \"row\",\n \"_e\" : [ {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"Luthien\"\n } ]\n }, {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"Tinuviel\"\n } ]\n }, {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"Queen\"\n } ]\n } ]\n }, {\n \"_t\" : \"row\",\n \"_e\" : [ {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"Thorin\"\n } ]\n }, {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"Oakshield\"\n } ]\n }, {\n \"_t\" : \"cell\",\n \"_e\" : [ {\n \"_t\" : \"para\",\n \"_v\" : \"King\"\n } ]\n } ]\n } ]\n } ]\n } ]\n}" +} \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_06.json b/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_06.json new file mode 100644 index 000000000..b61ef7389 --- /dev/null +++ b/fj-doc-playground-quarkus/src/test/resources/request/payload/generate/test_generate_input_06.json @@ -0,0 +1,5 @@ +{ + "inputFormat": "YAML", + "outputFormat":"HTML", + "docContent":"---\nxmlns: \"http://javacoredoc.fugerit.org\"\nxsi:schemaLocation: \"http://javacoredoc.fugerit.org https://www.fugerit.org/data/java/doc/xsd/doc-2-0.xsd\"\nxmlns:xsi: \"http://www.w3.org/2001/XMLSchema-instance\"\n_t: \"doc\"\n_e:\n- _t: \"metadata\"\n _e:\n - name: \"margins\"\n _t: \"info\"\n _v: \"10;10;10;30\"\n - name: \"excel-table-id\"\n _t: \"info\"\n _v: \"excel-table=print\"\n - name: \"doc-title\"\n _t: \"info\"\n _v: \"Basic example\"\n - name: \"doc-subject\"\n _t: \"info\"\n _v: \"fj doc venus sample source xml\"\n - name: \"doc-author\"\n _t: \"info\"\n _v: \"fugerit79\"\n - name: \"doc-language\"\n _t: \"info\"\n _v: \"en\"\n - name: \"default-font-name\"\n _t: \"info\"\n _v: \"TitilliumWeb\"\n - _t: \"footer-ext\"\n _e:\n - align: \"right\"\n _t: \"para\"\n _v: \"${r\\\"${currentPage}\\\"} / ${r\\\"${pageCount}\\\"}\"\n- _t: \"body\"\n _e:\n - _t: \"para\"\n _v: \"My sample title\"\n - padding: \"2\"\n columns: \"3\"\n width: \"100\"\n id: \"excel-table\"\n colwidths: \"30;30;40\"\n _t: \"table\"\n _e:\n - _t: \"row\"\n _e:\n - border-color: \"#000000\"\n border-width: \"1\"\n align: \"center\"\n _t: \"cell\"\n _e:\n - style: \"bold\"\n _t: \"para\"\n _v: \"Name\"\n - align: \"center\"\n _t: \"cell\"\n _e:\n - style: \"bold\"\n _t: \"para\"\n _v: \"Surname\"\n - align: \"center\"\n _t: \"cell\"\n _e:\n - style: \"bold\"\n _t: \"para\"\n _v: \"Title\"\n - _t: \"row\"\n _e:\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Luthien\"\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Tinuviel\"\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Queen\"\n - _t: \"row\"\n _e:\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Thorin\"\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"Oakshield\"\n - _t: \"cell\"\n _e:\n - _t: \"para\"\n _v: \"King\"\n" +} \ No newline at end of file diff --git a/fj-doc-playground-quarkus/src/test/resources/request/payload/val/pdf_as_pdf.pdf b/fj-doc-playground-quarkus/src/test/resources/request/payload/val/pdf_as_pdf.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cef8c4e5fbab761645ef8a35a81a7205ca99ddab GIT binary patch literal 37139 zcmb_l2|SeF`p=SOLL$2~${I0?!K7qgvt}2v?_`%!ktHEZ_M$AMB11efULfm}B}cvaN_OJ2Nkyd$}~|p4Nv@Tbg~GH!=10BFl>X zLjFkT{);Ig$Nz|&_%)w>+{3x*BioaGy663Mr}aM!K6YLbkE+)fa%uR(yy92$Cr|H! z^5Qq$3jxddL-X~=X=+wxr|S1#SYCQdG%8lZa$%`r{|#Z=KiW;jY4wuru3bl|moPLF zh1D)3v070iB)`~d)FsvH-3498%V@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_#P!Lj(gt}@*MCU5N-=)oejV8 zTxS!*Nom*F#BnRrbv7*FxJM&!s%7YNXuMh+YD0EC z*+g;24eM-TxZ}HZHgVi>_&OUFC$ECqMDVJqbv6_M_W|uLPX4v-IT4)hY@H2*6TGdn ziQ<%Y>uf-9Ca_@%$2|st6PG~0i@__n*4a=vb=Nu@8YduHXA>b9}nj1i&;!af(pD`}t@q9~jaWS#9V@lO;($a7Iq+)m57?~37$d)L{-31gxt z5D?ZsCx#%5lVW&91GGGVG6drQ=t{!!Fa%r$Hn<7qH{iS%w>z~CLmYQfxz2_qoCC!1 zyY$fK#8J47;B_`MZU=guO@uH`ievs_6a9-#jL?Qf5X4yEOyMs!)L(4qzt}|nV#EB! zCi)kfI6-U&5*Y#;3W4~G4fz)v>Mu6*Uu+_Ov56AI5)?3Ptskc-g!o@GfPdAyEXJMge)m`f-H<#G&iQACQ(1j8haKNLU|-fT@vS+@pXjc>VZ80gWSQFOZ_H zk2xrm2<|Qg$T$Ty0&({$th0#{%y}r381BA>b;uv63n$Iv>5I+lXcG#&H*^L5cpICuTX@3R|G|vD+ARd@G~&g z68IUI76|+-B8EF9T!%rJUjgX`L3{zajUW!8Fof|6g+USID!}ZEJNAI$VnlIoX|J=1 z;a+ZDX9I#FfelNrUOU1Te%2@(q+2ieSzIECh2SN=$@c4n>J!2<8+NFh>#i`7d)6aHc{S zBLKP)_*5KNjjs2fIFLLN*nkBCfek|#BgBE^g5Wt|@+Pohac}uT`wff0z1z9YhJX8a zo$W929t)74;JYG(F#-tL1Y;LS+t+^=@Br?OSqLr=5ee1?Xq4DmZh5+!0|z4RFx-!p zoV53|#x2l+pJ&AVq6>Ibs0|$4;LiQP%?RAT&&!Rj$fjtTQ?f@FMHivO@%WEjW{trDumrwuz literal 0 HcmV?d00001 diff --git a/fj-doc-playground-quarkus/src/test/resources/request/payload/val/png_as_pdf.pdf b/fj-doc-playground-quarkus/src/test/resources/request/payload/val/png_as_pdf.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ab8a3290d87ac4a02087e7e9f89518cbbf6c1608 GIT binary patch literal 2609 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sU|hw)1{9es^z|K(Vk{1FcVbv~PUa<$!;&U>cv7h@-A}f&3S>O>_%)r2R1cVu#>D|!^M67z0W_A z-J{&1bNp_Q)z0S)3u-1!`ZE39aeW4cAQlA%haLtNh7Q371_nbW0R{y(1}26h91aW( z5{w)S0?G`G3`wJkNC|=`_VV)b|MeIi?5%uj|Bz>C;oj!*U-1kL*>S(ykG+_E{rd*P@-g|kE z`8@gOi|^h`+*4m(W;S2mK6y_6vArMPSl*s_zMq@n)t)wfo8FF(fA)lhJwLY9+Bkad z%bAyh+-1K0=BqP1)~z|$2T^C+*}3}f>fO(4?nyu2z4zkPKLuOM%j?R{g;#IB zdvo>P<)05{<(o1$80kM!?+yHDqOK8wj)K%=-Ze3sT^<36B$@2M|Z{5FJnVKKRa3DYKsJ@Z= zF+Hnw-|UK?Z@6`PuKk{>bkpBGyU$0yegE#wx%FZUAKIsXY+OAfqV?G1&C6H+eE9O7 zW%S*jt9~YKH@7;!_MF{Z`LOEUpBWCw$DL+BcVI`<=BqOc&#rsczP$Q*&i1tO&v$oi z-etW0CNN~m)3-7-+~3p1zxL3hh;U%g?spIWeE9O-!m@w1>!yOD!+u?OPx|rQk88fo z+*`aanjzr1X-%-bZrQ%a-|y5OFaN{F@I$(S_x=_C?z!)O*p}b_D7&AL;U8PvVe_w- zlb&1Go&PDjo0Wm%!1k|~o1R