diff --git a/.checkstyle b/.checkstyle index 428926e..5783bc0 100644 --- a/.checkstyle +++ b/.checkstyle @@ -1,7 +1,7 @@ - + diff --git a/.classpath b/.classpath index 3231f67..fc30a74 100644 --- a/.classpath +++ b/.classpath @@ -1,15 +1,22 @@ - + + - - + + + + + + + + @@ -17,15 +24,10 @@ - + - + - - - - - - + diff --git a/.project b/.project index 993f532..eeb61ae 100644 --- a/.project +++ b/.project @@ -12,14 +12,26 @@ - net.sf.eclipsecs.core.CheckstyleBuilder + org.eclipse.ui.externaltools.ExternalToolBuilder + full,incremental, + + + LaunchConfigHandle + <project>/.externalToolBuilders/net.sf.eclipsecs.core.CheckstyleBuilder (2).launch + + + + + org.eclipse.m2e.core.maven2Builder + org.eclipse.m2e.core.maven2Nature org.eclipse.jdt.core.javanature net.sf.eclipsecs.core.CheckstyleNature + org.python.pydev.pythonNature diff --git a/exml.iml b/exml.iml deleted file mode 100644 index d47abfb..0000000 --- a/exml.iml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lutin_org-atriasoft-exml.py b/lutin_org-atriasoft-exml.py index 8092ade..e8d5444 100644 --- a/lutin_org-atriasoft-exml.py +++ b/lutin_org-atriasoft-exml.py @@ -40,7 +40,6 @@ def configure(target, my_module): 'src/org/atriasoft/exml/model/XmlNodeType.java', 'src/org/atriasoft/exml/model/XmlDeclaration.java', 'src/org/atriasoft/exml/model/XmlComment.java', - 'src/org/atriasoft/exml/internal/Log.java', 'src/org/atriasoft/exml/annotation/ExmlAnnotation.java', 'src/org/atriasoft/exml/annotation/XmlDefaultManaged.java', 'src/org/atriasoft/exml/annotation/XmlDefaultOptional.java', diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..05a8175 --- /dev/null +++ b/pom.xml @@ -0,0 +1,127 @@ + + 4.0.0 + org.atriasoft + exml + 0.1.0 + + 3.11.0 + 20 + 20 + + + + + gitea + https://gitea.atria-soft.org/api/packages/jatria-soft/maven + + + + + gitea + https://gitea.atria-soft.org/api/packages/jatria-soft/maven + + + gitea + https://gitea.atria-soft.org/api/packages/jatria-soft/maven + + + + + + jatria-soft + etk + 0.1.0 + + + jatria-soft + aknot + 0.1.0 + + + org.junit.jupiter + junit-jupiter-api + 5.9.3 + test + + + org.slf4j + slf4j-simple + 2.0.7 + test + + + + + src + test/src + ${project.basedir}/out/maven/ + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + ${maven.compiler.source} + ${maven.compiler.target} + + + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M5 + + + maven-assembly-plugin + + + + fully.qualified.MainClass + + + + jar-with-dependencies + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + private + true + + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + public + + + + + + diff --git a/src/module-info.java b/src/module-info.java index 1336a5a..29177aa 100644 --- a/src/module-info.java +++ b/src/module-info.java @@ -13,7 +13,6 @@ open module org.atriasoft.exml { requires transitive org.atriasoft.etk; requires transitive org.atriasoft.aknot; - requires transitive org.atriasoft.reggol; requires java.base; } diff --git a/src/org/atriasoft/exml/Exml.java b/src/org/atriasoft/exml/Exml.java index 1684c61..a6e35b7 100644 --- a/src/org/atriasoft/exml/Exml.java +++ b/src/org/atriasoft/exml/Exml.java @@ -17,20 +17,24 @@ import org.atriasoft.exml.builder.BuilderGeneric; import org.atriasoft.exml.exception.ExmlException; import org.atriasoft.exml.exception.ExmlParserErrorMulti; import org.atriasoft.exml.generator.GeneratorGeneric; -import org.atriasoft.exml.internal.Log; + import org.atriasoft.exml.model.XmlElement; import org.atriasoft.exml.model.XmlNode; import org.atriasoft.exml.parser.ParseXml; import org.atriasoft.exml.parser.ParsingProperty; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class Exml { + final static Logger LOGGER = LoggerFactory.getLogger(Exml.class); /** * Display the Document on console */ public static void display(final XmlElement node) { final StringBuilder tmpp = new StringBuilder(); Exml.generate(node, tmpp); - Log.info("Generated XML : \n" + tmpp.toString()); + LOGGER.info("Generated XML : \n" + tmpp.toString()); } /** @@ -60,7 +64,7 @@ public class Exml { e.printStackTrace(); } if (elemData == null) { - Log.error("Can not read the Stream : " + data); + LOGGER.error("Can not read the Stream : " + data); return null; } final String dataToParse = new String(elemData); @@ -82,7 +86,7 @@ public class Exml { property.setDisplayError(true); final byte[] elemData = Uri.getAllData(data); if (elemData == null) { - Log.error("Can not read the Stream : " + data); + LOGGER.error("Can not read the Stream : " + data); return null; } final String dataToParse = new String(elemData); diff --git a/src/org/atriasoft/exml/XmlMapper.java b/src/org/atriasoft/exml/XmlMapper.java index 172a9a0..cdf28cf 100644 --- a/src/org/atriasoft/exml/XmlMapper.java +++ b/src/org/atriasoft/exml/XmlMapper.java @@ -16,11 +16,14 @@ import org.atriasoft.exml.exception.ExmlBuilderException; import org.atriasoft.exml.exception.ExmlException; import org.atriasoft.exml.exception.ExmlNodeDoesNotExist; import org.atriasoft.exml.generator.GeneratorIntrospection; -import org.atriasoft.exml.internal.Log; + import org.atriasoft.exml.parser.ParseXml; import org.atriasoft.exml.parser.ParsingProperty; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class XmlMapper { + final static Logger LOGGER = LoggerFactory.getLogger(XmlMapper.class); private static String readFile(final Path path, final Charset encoding) throws IOException { final byte[] encoded = Files.readAllBytes(path); @@ -53,7 +56,7 @@ public class XmlMapper { e.printStackTrace(); } if (elemData == null) { - Log.error("Can not read the Stream : " + path); + LOGGER.error("Can not read the Stream : " + path); return null; } final String dataToParse = new String(elemData); @@ -113,7 +116,7 @@ public class XmlMapper { final byte[] elemData = Uri.getAllData(uri); if (elemData == null) { - Log.error("Can not read the Stream : " + uri); + LOGGER.error("Can not read the Stream : " + uri); return null; } final String content = new String(elemData); diff --git a/src/org/atriasoft/exml/builder/Builder.java b/src/org/atriasoft/exml/builder/Builder.java index b8672d6..ba2003a 100644 --- a/src/org/atriasoft/exml/builder/Builder.java +++ b/src/org/atriasoft/exml/builder/Builder.java @@ -6,10 +6,14 @@ package org.atriasoft.exml.builder; import org.atriasoft.aknot.exception.AknotException; +import org.atriasoft.exml.Exml; import org.atriasoft.exml.exception.ExmlBuilderException; import org.atriasoft.exml.exception.ExmlException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public interface Builder { + final static Logger LOGGER = LoggerFactory.getLogger(Builder.class); /** * Detect the end of the element : {@code} diff --git a/src/org/atriasoft/exml/builder/BuilderGeneric.java b/src/org/atriasoft/exml/builder/BuilderGeneric.java index a540c50..a16830f 100644 --- a/src/org/atriasoft/exml/builder/BuilderGeneric.java +++ b/src/org/atriasoft/exml/builder/BuilderGeneric.java @@ -13,8 +13,11 @@ import org.atriasoft.exml.model.XmlComment; import org.atriasoft.exml.model.XmlDeclaration; import org.atriasoft.exml.model.XmlElement; import org.atriasoft.exml.model.XmlText; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class BuilderGeneric implements Builder { + final static Logger LOGGER = LoggerFactory.getLogger(BuilderGeneric.class); @Override public void endElement(final Object element) { diff --git a/src/org/atriasoft/exml/builder/BuilderIntrospection.java b/src/org/atriasoft/exml/builder/BuilderIntrospection.java index 3bab5d8..3cb43db 100644 --- a/src/org/atriasoft/exml/builder/BuilderIntrospection.java +++ b/src/org/atriasoft/exml/builder/BuilderIntrospection.java @@ -13,9 +13,12 @@ import org.atriasoft.exml.exception.ExmlAttributeDoesNotExist; import org.atriasoft.exml.exception.ExmlBuilderException; import org.atriasoft.exml.exception.ExmlException; import org.atriasoft.exml.exception.ExmlNodeDoesNotExist; -import org.atriasoft.exml.internal.Log; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class BuilderIntrospection implements Builder { + final static Logger LOGGER = LoggerFactory.getLogger(BuilderIntrospection.class); // Keep in cach all the object alredy parsed ==> optimize CPU CacheIntrospectionModel cacheModel = new CacheIntrospectionModel(); // The root class (need to keep it if we use 2 time the builder, the root class is no more accessible). @@ -24,7 +27,8 @@ public class BuilderIntrospection implements Builder { final InterfaceFactoryAccess factory; public BuilderIntrospection(final InterfaceFactoryAccess factory) throws ExmlException, AknotException { - Log.critical("is it used ????"); + LOGGER.error("[CRITICAL] is it used ????"); + System.exit(-50); this.factory = factory; this.rootNodeName = null; this.rootClassType = null; @@ -41,7 +45,8 @@ public class BuilderIntrospection implements Builder { } public BuilderIntrospection(final ModelType model, final Class classType, final String rootNodeName) throws ExmlException, AknotException { - Log.critical("is it used ????"); + LOGGER.error("is it used ????"); + System.exit(-50); this.factory = null; this.rootNodeName = rootNodeName; this.rootClassType = classType; @@ -50,7 +55,7 @@ public class BuilderIntrospection implements Builder { @Override public void endElement(final Object element) throws ExmlBuilderException, AknotException { - Log.verbose("End of Element: {}", element); + LOGGER.trace("End of Element: {}", element); if (element == null) { return; } @@ -90,7 +95,7 @@ public class BuilderIntrospection implements Builder { if (parent == null) { return null; } - Log.verbose("new element on NodeName=" + nodeName); + LOGGER.trace("new element on NodeName=" + nodeName); final IntrospectionObject introspectionObject = (IntrospectionObject) parent; final IntrospectionModel model = introspectionObject.getModelIntrospection(); Class typeClass = null; @@ -107,7 +112,7 @@ public class BuilderIntrospection implements Builder { typeClass = model.getClassType(); } else { if (!introspectionObject.isSubNodeOrPropertyExist(nodeName) && model.isIgnoreUnknown()) { - Log.debug("Ignore node: '" + nodeName + "' Does not exist..."); + LOGGER.debug("Ignore node: '" + nodeName + "' Does not exist..."); return null; } try { @@ -121,7 +126,7 @@ public class BuilderIntrospection implements Builder { // specific case for List ==> need to get the subType in introspection ... if (typeClass.isArray()) { final Class subTypeClass = typeClass.getComponentType(); - Log.verbose("Create array new 'SUB' class: '" + typeClass.getCanonicalName() + "' for node '" + nodeName + "'"); + LOGGER.trace("Create array new 'SUB' class: '" + typeClass.getCanonicalName() + "' for node '" + nodeName + "'"); IntrospectionModel inferData = null; if (listTreeName == null) { inferData = this.cacheModel.findOrCreate(ModelType.NORMAL, null, subTypeClass); @@ -139,7 +144,7 @@ public class BuilderIntrospection implements Builder { } catch (final AknotException e) { throw new ExmlNodeDoesNotExist("Node does not exist: " + e.getMessage()); } - Log.verbose("Create List new 'SUB' class: '" + typeClass.getCanonicalName() + "' for node '" + nodeName + "'"); + LOGGER.trace("Create List new 'SUB' class: '" + typeClass.getCanonicalName() + "' for node '" + nodeName + "'"); IntrospectionModel inferData = null; if (listTreeName == null) { inferData = this.cacheModel.findOrCreate(ModelType.NORMAL, null, subTypeClass); @@ -149,7 +154,7 @@ public class BuilderIntrospection implements Builder { // Create the data when object is ended created... return new IntrospectionObject(inferData); } - Log.verbose("Create new class: '" + typeClass.getCanonicalName() + "' for node '" + nodeName + "'"); + LOGGER.trace("Create new class: '" + typeClass.getCanonicalName() + "' for node '" + nodeName + "'"); final IntrospectionModel inferData = this.cacheModel.findOrCreate(ModelType.NORMAL, listTreeName, typeClass); // Create the data when object is ended created... return new IntrospectionObject(inferData); @@ -160,7 +165,7 @@ public class BuilderIntrospection implements Builder { @Override public void newElementFinished(final Object parent, final String tmpName, final Object element) throws ExmlException, AknotException { - Log.debug("new element fionished : ==> " + tmpName); + LOGGER.debug("new element fionished : ==> " + tmpName); if (parent == null || element == null) { return; } @@ -198,7 +203,7 @@ public class BuilderIntrospection implements Builder { final String beanName = model.getBeanName(propertyName); if (beanName == null) { if (model.isIgnoreUnknown()) { - Log.debug("Ignore node : '" + propertyName + "'"); + LOGGER.debug("Ignore node : '" + propertyName + "'"); return; } throw new ExmlAttributeDoesNotExist("The node '" + propertyName + "' Does not exist..."); @@ -223,7 +228,7 @@ public class BuilderIntrospection implements Builder { } else if (List.class.isAssignableFrom(typeClass)) { final String[] elems = propertyValue.split(";"); final Class subTypeClass = introspectionObject.getTypeOfSubProperty(propertyName); - Log.verbose("Create List new 'SUB' class: '" + typeClass.getCanonicalName() + "' for property '" + propertyName + "'"); + LOGGER.trace("Create List new 'SUB' class: '" + typeClass.getCanonicalName() + "' for property '" + propertyName + "'"); final IntrospectionModel inferData = this.cacheModel.findOrCreate(ModelType.NORMAL, null, subTypeClass); final List out = new ArrayList<>(); for (int iii = 0; iii < elems.length; iii++) { @@ -270,7 +275,7 @@ public class BuilderIntrospection implements Builder { final String beanName = model.getTextBeanName(); if (beanName == null) { if (model.isIgnoreUnknown()) { - Log.debug("Ignore node : **TEXT**"); + LOGGER.debug("Ignore node : **TEXT**"); return; } throw new ExmlAttributeDoesNotExist("The node **TEXT** Does not exist..."); @@ -282,7 +287,7 @@ public class BuilderIntrospection implements Builder { final Object out = StringSerializer.valueOf(typeClass, text); introspectionObject.putProperty(beanName, out); } else if (typeClass.isArray()) { - Log.error("Not managed !!! "); + LOGGER.error("Not managed !!! "); /* final String[] elems = propertyValue.split(";"); final Class subTypeClass = typeClass.getComponentType(); @@ -295,11 +300,11 @@ public class BuilderIntrospection implements Builder { introspectionObject.putProperty(propertyName, out); */ } else if (List.class.isAssignableFrom(typeClass)) { - Log.error("Not managed !!! "); + LOGGER.error("Not managed !!! "); /* final String[] elems = propertyValue.split(";"); final Class subTypeClass = introspectionObject.getTypeOfSubProperty(propertyName); - Log.verbose("Create List new 'SUB' class: '" + typeClass.getCanonicalName() + "' for property '" + propertyName + "'"); + LOGGER.trace("Create List new 'SUB' class: '" + typeClass.getCanonicalName() + "' for property '" + propertyName + "'"); final IntrospectionModel inferData = this.cacheModel.findOrCreate(ModelType.NORMAL, null, subTypeClass); final List out = new ArrayList<>(); for (int iii = 0; iii < elems.length; iii++) { @@ -309,7 +314,7 @@ public class BuilderIntrospection implements Builder { introspectionObject.putProperty(propertyName, out); */ } else { - //Log.error("Not managed !!! "); + //LOGGER.error("Not managed !!! "); final IntrospectionModel inferData = this.cacheModel.findOrCreate(ModelType.NORMAL, null, typeClass); final Object out = inferData.getValueFromText(text); introspectionObject.putProperty(IntrospectionObject.PUBLIC_TEXT_NAME, out); diff --git a/src/org/atriasoft/exml/builder/IntrospectionObject.java b/src/org/atriasoft/exml/builder/IntrospectionObject.java index be7216b..c351099 100644 --- a/src/org/atriasoft/exml/builder/IntrospectionObject.java +++ b/src/org/atriasoft/exml/builder/IntrospectionObject.java @@ -9,9 +9,13 @@ import org.atriasoft.aknot.exception.AknotException; import org.atriasoft.aknot.model.IntrospectionModel; import org.atriasoft.exml.exception.ExmlException; import org.atriasoft.exml.exception.ExmlNodeDoesNotExist; -import org.atriasoft.exml.internal.Log; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class IntrospectionObject { + final static Logger LOGGER = LoggerFactory.getLogger(IntrospectionObject.class); + public static final String PUBLIC_TEXT_NAME = "##<< ** TEXT-ZONE ** >>##"; private final IntrospectionModel modelInterface; private Object data = null; @@ -37,32 +41,32 @@ public class IntrospectionObject { if (List.class.isAssignableFrom(value.getClass())) { node = (List) value; } else if (value.getClass().isArray()) { - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); } else { node = new ArrayList<>(); node.add(value); } this.nodes.put(beanName, node); } else if (value.getClass().isArray()) { - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); - Log.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); + LOGGER.error("this is a big problem ..."); } else if (List.class.isAssignableFrom(value.getClass())) { final List nodeIn = (List) value; node.addAll(nodeIn); @@ -76,10 +80,10 @@ public class IntrospectionObject { // nothing to do ... ==> element already created return; } - Log.warning("Create the element for the Specific node ... type = " + this.modelInterface.getClassType().getCanonicalName() + (this.modelInterface.isArray() ? "[array]" : "") + LOGGER.warn("Create the element for the Specific node ... type = " + this.modelInterface.getClassType().getCanonicalName() + (this.modelInterface.isArray() ? "[array]" : "") + (this.modelInterface.isList() ? "[List]" : "")); - Log.warning(" Properties : " + this.properties.keySet()); - Log.warning(" Nodes : " + this.nodes.keySet()); + LOGGER.warn(" Properties : " + this.properties.keySet()); + LOGGER.warn(" Nodes : " + this.nodes.keySet()); this.data = this.modelInterface.createObject(this.properties, this.nodes, false); } diff --git a/src/org/atriasoft/exml/exception/ExmlAttributeDoesNotExist.java b/src/org/atriasoft/exml/exception/ExmlAttributeDoesNotExist.java index eeb35b7..a419fdd 100644 --- a/src/org/atriasoft/exml/exception/ExmlAttributeDoesNotExist.java +++ b/src/org/atriasoft/exml/exception/ExmlAttributeDoesNotExist.java @@ -5,7 +5,11 @@ */ package org.atriasoft.exml.exception; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class ExmlAttributeDoesNotExist extends ExmlException { + final static Logger LOGGER = LoggerFactory.getLogger(ExmlAttributeDoesNotExist.class); /** * Generate Unique ID for serialization */ diff --git a/src/org/atriasoft/exml/exception/ExmlBuilderException.java b/src/org/atriasoft/exml/exception/ExmlBuilderException.java index 5fbedca..dc541b7 100644 --- a/src/org/atriasoft/exml/exception/ExmlBuilderException.java +++ b/src/org/atriasoft/exml/exception/ExmlBuilderException.java @@ -5,7 +5,11 @@ */ package org.atriasoft.exml.exception; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class ExmlBuilderException extends ExmlException { + final static Logger LOGGER = LoggerFactory.getLogger(ExmlBuilderException.class); /** * Generate Unique ID for serialization */ diff --git a/src/org/atriasoft/exml/exception/ExmlException.java b/src/org/atriasoft/exml/exception/ExmlException.java index 205f8eb..cbbc186 100644 --- a/src/org/atriasoft/exml/exception/ExmlException.java +++ b/src/org/atriasoft/exml/exception/ExmlException.java @@ -5,7 +5,11 @@ */ package org.atriasoft.exml.exception; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class ExmlException extends Exception { + final static Logger LOGGER = LoggerFactory.getLogger(ExmlException.class); /** * Generate Unique ID for serialization */ diff --git a/src/org/atriasoft/exml/exception/ExmlNodeDoesNotExist.java b/src/org/atriasoft/exml/exception/ExmlNodeDoesNotExist.java index c3f0e22..9f65578 100644 --- a/src/org/atriasoft/exml/exception/ExmlNodeDoesNotExist.java +++ b/src/org/atriasoft/exml/exception/ExmlNodeDoesNotExist.java @@ -5,7 +5,11 @@ */ package org.atriasoft.exml.exception; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class ExmlNodeDoesNotExist extends ExmlException { + final static Logger LOGGER = LoggerFactory.getLogger(ExmlNodeDoesNotExist.class); /** * Generate Unique ID for serialization */ diff --git a/src/org/atriasoft/exml/exception/ExmlParserError.java b/src/org/atriasoft/exml/exception/ExmlParserError.java index 0a9315f..664fa94 100644 --- a/src/org/atriasoft/exml/exception/ExmlParserError.java +++ b/src/org/atriasoft/exml/exception/ExmlParserError.java @@ -1,8 +1,11 @@ package org.atriasoft.exml.exception; import org.atriasoft.etk.util.FilePos; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ExmlParserError extends ExmlBuilderException { + final static Logger LOGGER = LoggerFactory.getLogger(ExmlParserError.class); private static final long serialVersionUID = 1L; private final String dataLine; //!< Parse line error (copy); diff --git a/src/org/atriasoft/exml/exception/ExmlParserErrorMulti.java b/src/org/atriasoft/exml/exception/ExmlParserErrorMulti.java index 19bf26a..9d31a54 100644 --- a/src/org/atriasoft/exml/exception/ExmlParserErrorMulti.java +++ b/src/org/atriasoft/exml/exception/ExmlParserErrorMulti.java @@ -2,7 +2,11 @@ package org.atriasoft.exml.exception; import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class ExmlParserErrorMulti extends ExmlBuilderException { + final static Logger LOGGER = LoggerFactory.getLogger(ExmlParserErrorMulti.class); private static final long serialVersionUID = 1L; private final List errors; // list of errors diff --git a/src/org/atriasoft/exml/generator/Generator.java b/src/org/atriasoft/exml/generator/Generator.java index c38359e..0faa594 100644 --- a/src/org/atriasoft/exml/generator/Generator.java +++ b/src/org/atriasoft/exml/generator/Generator.java @@ -1,5 +1,9 @@ package org.atriasoft.exml.generator; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public interface Generator { + final static Logger LOGGER = LoggerFactory.getLogger(Generator.class); } diff --git a/src/org/atriasoft/exml/generator/GeneratorGeneric.java b/src/org/atriasoft/exml/generator/GeneratorGeneric.java index 4cd20f2..05d10c6 100644 --- a/src/org/atriasoft/exml/generator/GeneratorGeneric.java +++ b/src/org/atriasoft/exml/generator/GeneratorGeneric.java @@ -3,7 +3,7 @@ package org.atriasoft.exml.generator; import java.util.List; import org.atriasoft.etk.Tools; -import org.atriasoft.exml.internal.Log; + import org.atriasoft.exml.model.XmlAttribute; import org.atriasoft.exml.model.XmlAttributeList; import org.atriasoft.exml.model.XmlComment; @@ -12,8 +12,11 @@ import org.atriasoft.exml.model.XmlElement; import org.atriasoft.exml.model.XmlNode; import org.atriasoft.exml.model.XmlNodeType; import org.atriasoft.exml.model.XmlText; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class GeneratorGeneric { + final static Logger LOGGER = LoggerFactory.getLogger(GeneratorGeneric.class); public static void serialize(final XmlNode node, final StringBuilder data, final int indent) { if (node instanceof XmlElement) { GeneratorGeneric.serializeElement((XmlElement) node, data, indent); @@ -73,7 +76,7 @@ public class GeneratorGeneric { if (nodes.size() == 1 && nodes.get(0) != null && nodes.get(0).getType() == XmlNodeType.TEXT && ((XmlText) nodes.get(0)).countLines() == 1) { data.append(">"); GeneratorGeneric.serialize(nodes.get(0), data, 0); - Log.verbose(" generate : '" + data + "'"); + LOGGER.trace(" generate : '" + data + "'"); } else { data.append(">"); for (final XmlNode node : nodes) { diff --git a/src/org/atriasoft/exml/generator/GeneratorIntrospection.java b/src/org/atriasoft/exml/generator/GeneratorIntrospection.java index 876a1e1..41042ac 100644 --- a/src/org/atriasoft/exml/generator/GeneratorIntrospection.java +++ b/src/org/atriasoft/exml/generator/GeneratorIntrospection.java @@ -13,9 +13,12 @@ import org.atriasoft.aknot.pojo.IntrospectionProperty; import org.atriasoft.etk.Tools; import org.atriasoft.etk.util.ArraysTools; import org.atriasoft.exml.exception.ExmlBuilderException; -import org.atriasoft.exml.internal.Log; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class GeneratorIntrospection implements Generator { + final static Logger LOGGER = LoggerFactory.getLogger(GeneratorIntrospection.class); // Keep in cache all the object already parsed ==> optimize CPU final Map elements = new HashMap<>(); // The root class (need to keep it if we use 2 time the builder, the root class is no more accessible). @@ -156,7 +159,7 @@ public class GeneratorIntrospection implements Generator { tmpp.append(nodeName); tmpp.append(">"); } - Log.error("lkjlk"); + LOGGER.error("lkjlk"); } else if (model.isList()) { final List baseName = model.getNodeAvaillable(); @SuppressWarnings("unchecked") diff --git a/src/org/atriasoft/exml/internal/Log.java b/src/org/atriasoft/exml/internal/Log.java deleted file mode 100644 index f0ed712..0000000 --- a/src/org/atriasoft/exml/internal/Log.java +++ /dev/null @@ -1,81 +0,0 @@ -/** @file - * @author Edouard DUPIN - * @copyright 2021, Edouard DUPIN, all right reserved - * @license MPL v2.0 (see license file) - */ -package org.atriasoft.exml.internal; - -import org.atriasoft.reggol.LogLevel; -import org.atriasoft.reggol.Logger; - -public class Log { - private static final boolean FORCE_ALL = false; - private static final String LIB_NAME = "exml"; - private static final String LIB_NAME_DRAW = Logger.getDrawableName(Log.LIB_NAME); - private static final boolean PRINT_CRITICAL = Logger.getNeedPrint(Log.LIB_NAME, LogLevel.CRITICAL); - private static final boolean PRINT_DEBUG = Logger.getNeedPrint(Log.LIB_NAME, LogLevel.DEBUG); - private static final boolean PRINT_ERROR = Logger.getNeedPrint(Log.LIB_NAME, LogLevel.ERROR); - private static final boolean PRINT_INFO = Logger.getNeedPrint(Log.LIB_NAME, LogLevel.INFO); - private static final boolean PRINT_PRINT = Logger.getNeedPrint(Log.LIB_NAME, LogLevel.PRINT); - private static final boolean PRINT_TODO = Logger.getNeedPrint(Log.LIB_NAME, LogLevel.TODO); - private static final boolean PRINT_VERBOSE = Logger.getNeedPrint(Log.LIB_NAME, LogLevel.VERBOSE); - private static final boolean PRINT_WARNING = Logger.getNeedPrint(Log.LIB_NAME, LogLevel.WARNING); - - public static void critical(final Exception e, final String data) { - e.printStackTrace(); - if (PRINT_CRITICAL || FORCE_ALL) { - Logger.critical(LIB_NAME_DRAW, data + " : " + e.getMessage()); - } - } - - public static void critical(final String data, final Object... objects) { - if (PRINT_CRITICAL || FORCE_ALL) { - Logger.critical(LIB_NAME_DRAW, data, objects); - } - } - - public static void debug(final String data, final Object... objects) { - if (PRINT_DEBUG || FORCE_ALL) { - Logger.debug(LIB_NAME_DRAW, data, objects); - } - } - - public static void error(final String data, final Object... objects) { - if (PRINT_ERROR || FORCE_ALL) { - Logger.error(LIB_NAME_DRAW, data, objects); - } - } - - public static void info(final String data, final Object... objects) { - if (PRINT_INFO || FORCE_ALL) { - Logger.info(LIB_NAME_DRAW, data, objects); - } - } - - public static void print(final String data, final Object... objects) { - if (PRINT_PRINT || FORCE_ALL) { - Logger.print(LIB_NAME_DRAW, data, objects); - } - } - - public static void todo(final String data, final Object... objects) { - if (PRINT_TODO || FORCE_ALL) { - Logger.todo(LIB_NAME_DRAW, data, objects); - } - } - - public static void verbose(final String data, final Object... objects) { - if (PRINT_VERBOSE || FORCE_ALL) { - Logger.verbose(LIB_NAME_DRAW, data, objects); - } - } - - public static void warning(final String data, final Object... objects) { - if (PRINT_WARNING || FORCE_ALL) { - Logger.warning(LIB_NAME_DRAW, data, objects); - } - } - - private Log() {} - -} diff --git a/src/org/atriasoft/exml/model/XmlAttribute.java b/src/org/atriasoft/exml/model/XmlAttribute.java index 4da5840..69ae6f1 100644 --- a/src/org/atriasoft/exml/model/XmlAttribute.java +++ b/src/org/atriasoft/exml/model/XmlAttribute.java @@ -6,11 +6,14 @@ package org.atriasoft.exml.model; import org.atriasoft.etk.util.FilePos; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Single attribute element */ public class XmlAttribute { + final static Logger LOGGER = LoggerFactory.getLogger(XmlAttribute.class); protected String name; //!< Name of the attribute protected FilePos pos; //!< position in the read file (null if the file is not parsed); diff --git a/src/org/atriasoft/exml/model/XmlAttributeList.java b/src/org/atriasoft/exml/model/XmlAttributeList.java index d76c0ab..4c288be 100644 --- a/src/org/atriasoft/exml/model/XmlAttributeList.java +++ b/src/org/atriasoft/exml/model/XmlAttributeList.java @@ -12,12 +12,15 @@ import java.util.ListIterator; import org.atriasoft.etk.util.Pair; import org.atriasoft.exml.exception.ExmlAttributeDoesNotExist; -import org.atriasoft.exml.internal.Log; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * List of all attribute element in a node */ public abstract class XmlAttributeList extends XmlNode { + final static Logger LOGGER = LoggerFactory.getLogger(XmlAttributeList.class); protected List listAttribute = new ArrayList<>(); //!< list of all attribute; public XmlAttributeList() {} @@ -36,16 +39,16 @@ public abstract class XmlAttributeList extends XmlNode { */ public void appendAttribute(final XmlAttribute attr) { if (attr == null) { - Log.error("Try to set an empty node"); + LOGGER.error("Try to set an empty node"); return; } for (int iii = 0; iii < this.listAttribute.size(); iii++) { if (this.listAttribute.get(iii) == attr) { - Log.error("Try to add a node that is already added before !!!"); + LOGGER.error("Try to add a node that is already added before !!!"); return; } if (this.listAttribute.get(iii).getName().contentEquals(attr.getName())) { - Log.error("Try to add a node that is already added before (same name)"); + LOGGER.error("Try to add a node that is already added before (same name)"); return; } } diff --git a/src/org/atriasoft/exml/model/XmlComment.java b/src/org/atriasoft/exml/model/XmlComment.java index 1397aa0..c5cfb1c 100644 --- a/src/org/atriasoft/exml/model/XmlComment.java +++ b/src/org/atriasoft/exml/model/XmlComment.java @@ -5,10 +5,14 @@ */ package org.atriasoft.exml.model; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * Comment node: lt;!-- ... --gt; */ public class XmlComment extends XmlNode { + final static Logger LOGGER = LoggerFactory.getLogger(XmlComment.class); public XmlComment() { } diff --git a/src/org/atriasoft/exml/model/XmlDeclaration.java b/src/org/atriasoft/exml/model/XmlDeclaration.java index bedd364..e287369 100644 --- a/src/org/atriasoft/exml/model/XmlDeclaration.java +++ b/src/org/atriasoft/exml/model/XmlDeclaration.java @@ -5,12 +5,15 @@ */ package org.atriasoft.exml.model; -import org.atriasoft.exml.internal.Log; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Declaration node: lt;?XXXXXX ... gt; */ public class XmlDeclaration extends XmlAttributeList { + final static Logger LOGGER = LoggerFactory.getLogger(XmlDeclaration.class); public XmlDeclaration() { super(""); } @@ -31,7 +34,7 @@ public class XmlDeclaration extends XmlAttributeList { if (format.contentEquals("UTF-8")) { setAttribute("encoding", "UTF-8"); } else { - Log.error("Actually does not supported other charset than UTF8"); + LOGGER.error("Actually does not supported other charset than UTF8"); setAttribute("encoding", "UTF-8"); } if (standalone) { diff --git a/src/org/atriasoft/exml/model/XmlElement.java b/src/org/atriasoft/exml/model/XmlElement.java index 5d6d98a..bb9b726 100644 --- a/src/org/atriasoft/exml/model/XmlElement.java +++ b/src/org/atriasoft/exml/model/XmlElement.java @@ -12,7 +12,9 @@ import java.util.ListIterator; import org.atriasoft.exml.exception.ExmlNodeDoesNotExist; import org.atriasoft.exml.generator.GeneratorGeneric; -import org.atriasoft.exml.internal.Log; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** @file * @author Edouard DUPIN @@ -23,6 +25,7 @@ import org.atriasoft.exml.internal.Log; * Basic element Node of an XML document lt;YYYYYgt; */ public class XmlElement extends XmlAttributeList { + final static Logger LOGGER = LoggerFactory.getLogger(XmlElement.class); protected List listSub = new ArrayList<>(); //!< List of subNodes; /** @@ -55,12 +58,12 @@ public class XmlElement extends XmlAttributeList { */ public void append(final XmlNode node) { if (node == null) { - Log.error("Try to set an empty node"); + LOGGER.error("Try to set an empty node"); return; } for (int iii = 0; iii < this.listSub.size(); iii++) { if (this.listSub.get(iii) == node) { - Log.error("Try to add a node that is already added before !!!"); + LOGGER.error("Try to add a node that is already added before !!!"); return; } } diff --git a/src/org/atriasoft/exml/model/XmlNode.java b/src/org/atriasoft/exml/model/XmlNode.java index 90d77fc..556362c 100644 --- a/src/org/atriasoft/exml/model/XmlNode.java +++ b/src/org/atriasoft/exml/model/XmlNode.java @@ -5,10 +5,14 @@ */ package org.atriasoft.exml.model; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * Basic main object of all xml elements. */ public abstract class XmlNode { + final static Logger LOGGER = LoggerFactory.getLogger(XmlNode.class); /// Value of the node (for element this is the name, for text it is the inside text ...)(null for the root element); protected String value = null; diff --git a/src/org/atriasoft/exml/model/XmlText.java b/src/org/atriasoft/exml/model/XmlText.java index 5fd7ce4..f282f92 100644 --- a/src/org/atriasoft/exml/model/XmlText.java +++ b/src/org/atriasoft/exml/model/XmlText.java @@ -5,10 +5,14 @@ */ package org.atriasoft.exml.model; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * Text node interface (internal data between two Marker: <XXX> ALL here </XXX> */ public class XmlText extends XmlNode { + final static Logger LOGGER = LoggerFactory.getLogger(XmlText.class); /** * Constructor diff --git a/src/org/atriasoft/exml/parser/ParseXml.java b/src/org/atriasoft/exml/parser/ParseXml.java index 9570353..ac8d191 100644 --- a/src/org/atriasoft/exml/parser/ParseXml.java +++ b/src/org/atriasoft/exml/parser/ParseXml.java @@ -7,9 +7,11 @@ import org.atriasoft.exml.builder.Builder; import org.atriasoft.exml.exception.ExmlException; import org.atriasoft.exml.exception.ExmlParserError; import org.atriasoft.exml.exception.ExmlParserErrorMulti; -import org.atriasoft.exml.internal.Log; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ParseXml { + final static Logger LOGGER = LoggerFactory.getLogger(ParseXml.class); // global builder that is generate the final Tree private final Builder builder; @@ -19,7 +21,7 @@ public class ParseXml { protected boolean iParseAttribute(final Object parent, final String data, final PositionParsing pos, final FilePos filePos, final ParsingProperty parsingProperty) throws ExmlException, AknotException { - Log.verbose("start parse : 'attribute'"); + LOGGER.trace("start parse : 'attribute'"); // search end of the comment : int lastElementName = pos.value; for (int iii = pos.value; iii < data.length(); iii++) { @@ -106,7 +108,7 @@ public class ParseXml { protected boolean iParseCDATA(final Object parent, final String data, final PositionParsing pos, final FilePos filePos, final ParsingProperty parsingProperty) throws ExmlException, AknotException { - Log.verbose("start parse : 'text::CDATA'"); + LOGGER.trace("start parse : 'text::CDATA'"); // search end of the comment : for (int iii = pos.value; iii + 2 < data.length(); iii++) { Tools.drawElementParsed(data.charAt(iii), filePos); @@ -117,7 +119,7 @@ public class ParseXml { // find end of value: filePos.add(2); final String valueCData = data.substring(pos.value, iii); - Log.verbose(" find text CDATA '" + valueCData + "'"); + LOGGER.trace(" find text CDATA '" + valueCData + "'"); pos.value = iii + 2; this.builder.newText(parent, valueCData); return true; @@ -130,7 +132,7 @@ public class ParseXml { protected boolean iParseComment(final Object parent, final String data, final PositionParsing pos, final FilePos filePos, final ParsingProperty parsingProperty) throws ExmlException, AknotException { - Log.verbose("start parse : 'comment'"); + LOGGER.trace("start parse : 'comment'"); final FilePos tmpPos = new FilePos(); final int white = Tools.countWhiteChar(data, pos.value, tmpPos); filePos.add(tmpPos); @@ -152,7 +154,7 @@ public class ParseXml { } // find end of value: final String value2 = data.substring(pos.value + white, newEnd); - Log.verbose(" find comment '" + value2 + "'"); + LOGGER.trace(" find comment '" + value2 + "'"); this.builder.newComment(parent, value2); pos.value = iii + 2; return true; @@ -198,7 +200,7 @@ public class ParseXml { } protected boolean iParseDOCTYPE(final Object parent, final String data, final PositionParsing pos, final FilePos filePos, final ParsingProperty parsingProperty) throws ExmlException { - Log.verbose("start parse : 'DOCTYPE'"); + LOGGER.trace("start parse : 'DOCTYPE'"); final FilePos tmpPos = new FilePos(); final int white = Tools.countWhiteChar(data, pos.value, tmpPos); filePos.add(tmpPos); @@ -268,7 +270,7 @@ public class ParseXml { protected int iParseFindEndComment(final String data, final int position) { for (int iii = position; iii + 2 < data.length(); iii++) { - Log.verbose("iParseFindEndComment : '{}{}{}'", data.charAt(iii), data.charAt(iii + 1), data.charAt(iii + 2)); + LOGGER.trace("iParseFindEndComment : '{}{}{}'", data.charAt(iii), data.charAt(iii + 1), data.charAt(iii + 2)); if (data.charAt(iii) == '-' && data.charAt(iii + 1) == '-' && data.charAt(iii + 2) == '>') { return iii + 2; } @@ -278,7 +280,7 @@ public class ParseXml { protected int iParseFindEndDeclaration(final String data, final int position) { for (int iii = position; iii + 1 < data.length(); iii++) { - Log.verbose("iParseFindEndDeclaration : '{}{}'", data.charAt(iii), data.charAt(iii + 1)); + LOGGER.trace("iParseFindEndDeclaration : '{}{}'", data.charAt(iii), data.charAt(iii + 1)); if (data.charAt(iii) == '?' && data.charAt(iii + 1) == '>') { return iii + 1; } @@ -287,7 +289,7 @@ public class ParseXml { } protected int iParseFindEndNode(final String data, final int position) { - Log.verbose("iParseFindEndNode : {}", data.charAt(position)); + LOGGER.trace("iParseFindEndNode : {}", data.charAt(position)); if (position + 3 < data.length() && data.charAt(position) == '!' && data.charAt(position + 1) == '-' && data.charAt(position + 2) == '-') { // fond comment return iParseFindEndComment(data, position + 3); @@ -304,7 +306,7 @@ public class ParseXml { // normal Node newPos = iParseFindTextPackEnd(data, newPos) + 1; if (data.charAt(newPos) != '<' || data.charAt(newPos + 1) != '/') { - Log.error("iParseFindEndNode : {}{} ==> wrong end node !!! ", data.charAt(newPos), data.charAt(newPos + 1)); + LOGGER.error("iParseFindEndNode : {}{} ==> wrong end node !!! ", data.charAt(newPos), data.charAt(newPos + 1)); } newPos = iParseFindEndSingleNode(data, newPos + 1); return newPos; @@ -312,7 +314,7 @@ public class ParseXml { protected int iParseFindEndSingleNode(final String data, final int position) { for (int iii = position; iii < data.length(); iii++) { - Log.verbose("iParseFindEndSingleNode : '{}'", data.charAt(iii)); + LOGGER.trace("iParseFindEndSingleNode : '{}'", data.charAt(iii)); if (data.charAt(iii) == '>') { return iii; } @@ -322,13 +324,13 @@ public class ParseXml { protected int iParseFindTextPackEnd(final String data, final int position) { for (int iii = position; iii < data.length(); iii++) { - Log.verbose("iParseFindTextPackEnd : {}", data.charAt(iii)); + LOGGER.trace("iParseFindTextPackEnd : {}", data.charAt(iii)); if (data.charAt(iii) == '<' && data.charAt(iii + 1) == '/') { - Log.verbose("iParseFindTextPackEnd ==> find end of text !!!"); + LOGGER.trace("iParseFindTextPackEnd ==> find end of text !!!"); return iii - 1; } if (data.charAt(iii) == '<') { - Log.verbose("iParseFindTextPackEnd ==> find new node !!!"); + LOGGER.trace("iParseFindTextPackEnd ==> find new node !!!"); final int endNode = iParseFindEndNode(data, iii + 1); iii = endNode; continue; @@ -338,11 +340,11 @@ public class ParseXml { } protected boolean iParseText(final Object parent, final String data, final PositionParsing pos, final FilePos filePos, final ParsingProperty parsingProperty) throws ExmlException, AknotException { - Log.verbose("start parse : 'text'"); + LOGGER.trace("start parse : 'text'"); if (this.builder.isPackText(parent)) { final int endOfText = iParseFindTextPackEnd(data, pos.value); final String valueText = data.substring(pos.value, endOfText + 1); - Log.verbose("find text '{}' ==> new Pos='{}'", valueText, data.charAt(endOfText + 1)); + LOGGER.trace("find text '{}' ==> new Pos='{}'", valueText, data.charAt(endOfText + 1)); pos.value = endOfText; this.builder.newText(parent, valueText); return true; @@ -364,7 +366,7 @@ public class ParseXml { } // find end of value: String valueText = data.substring(pos.value, newEnd); - Log.verbose("find text '" + valueText + "'"); + LOGGER.trace("find text '" + valueText + "'"); pos.value = iii - 1; valueText = Tools.replaceSpecialChar(valueText); this.builder.newText(parent, valueText); @@ -378,7 +380,7 @@ public class ParseXml { } public Object parse(final String data, final ParsingProperty property) throws ExmlException, AknotException { - Log.verbose("Start parsing document (type: string) size=" + data.length()); + LOGGER.trace("Start parsing document (type: string) size=" + data.length()); // came from char == > force in utf8 ... final FilePos pos = new FilePos(1, 0); final PositionParsing parsePos = new PositionParsing(); @@ -452,7 +454,7 @@ public class ParseXml { final Object declaration = this.builder.newDeclaration(parent, tmpname); filePos.add(tmpPos); pos.value = endPosName + 1; - Log.verbose("start parse : 'declaration' : '" + tmpname + "'"); + LOGGER.trace("start parse : 'declaration' : '" + tmpname + "'"); if (!iParseDeclaration(declaration, data, pos, filePos, parsingProperty)) { return false; } @@ -532,7 +534,7 @@ public class ParseXml { } if (data.charAt(iii + white + 1) == '/') { tmpPos.increment(); - Log.debug("Detect END of Node name : '" + nameElement + "'"); + LOGGER.debug("Detect END of Node name : '" + nameElement + "'"); int endPosName = iii + white + 1; // generate element name ... for (int jjj = iii + white + 2; jjj < data.length(); jjj++) { @@ -584,7 +586,7 @@ public class ParseXml { if (Tools.checkAvaillable(data.charAt(iii + white + 1), true)) { tmpPos.increment(); - Log.debug("Generate node name : '" + data.charAt(iii + 1) + "...'"); + LOGGER.debug("Generate node name : '" + data.charAt(iii + 1) + "...'"); int endPosName = iii + white + 1; // generate element name ... for (int jjj = iii + white + 2; jjj < data.length(); jjj++) { @@ -598,7 +600,7 @@ public class ParseXml { final String tmpname = data.substring(iii + white + 1, endPosName + 1); final String tmpnameOriginal = tmpname; - Log.debug("find node named : '" + tmpname + "'"); + LOGGER.debug("find node named : '" + tmpname + "'"); // find text: Object element = null; //try { @@ -609,7 +611,7 @@ public class ParseXml { //} pos.value = endPosName + 1; filePos.add(tmpPos); - Log.verbose("start parse : 'element' named='" + tmpname + "'"); + LOGGER.trace("start parse : 'element' named='" + tmpname + "'"); if (!iParseElement(element, tmpnameOriginal, data, pos, filePos, parsingProperty)) { return false; } diff --git a/src/org/atriasoft/exml/parser/ParsingProperty.java b/src/org/atriasoft/exml/parser/ParsingProperty.java index b166d9a..4cb294e 100644 --- a/src/org/atriasoft/exml/parser/ParsingProperty.java +++ b/src/org/atriasoft/exml/parser/ParsingProperty.java @@ -6,9 +6,11 @@ import java.util.List; import org.atriasoft.etk.Tools; import org.atriasoft.exml.exception.ExmlParserError; -import org.atriasoft.exml.internal.Log; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ParsingProperty { + final static Logger LOGGER = LoggerFactory.getLogger(ParsingProperty.class); /// check the case sensitive of the nodes (end marker) and attribute (duplicates) private boolean caseSensitive = true; // List of all error detected @@ -71,7 +73,7 @@ public class ParsingProperty { * @param error The error to display. */ public void displayError(final ExmlParserError error) { - Log.error(error.getFilePos() + " " + error.getMessage() + "\n" + error.getDataLine() + "\n" + Tools.createPosPointer(error.getDataLine(), error.getFilePos().getCol())); + LOGGER.error(error.getFilePos() + " " + error.getMessage() + "\n" + error.getDataLine() + "\n" + Tools.createPosPointer(error.getDataLine(), error.getFilePos().getCol())); } /** diff --git a/test/resources/simplelogger.properties b/test/resources/simplelogger.properties new file mode 100644 index 0000000..4314b58 --- /dev/null +++ b/test/resources/simplelogger.properties @@ -0,0 +1,35 @@ +# SLF4J's SimpleLogger configuration file +# Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err. +# Default logging detail level for all instances of SimpleLogger. +# Must be one of ("trace", "debug", "info", "warn", or "error"). +# If not specified, defaults to "info". +org.slf4j.simpleLogger.defaultLogLevel=trace + +# Logging detail level for a SimpleLogger instance named "xxxxx". +# Must be one of ("trace", "debug", "info", "warn", or "error"). +# If not specified, the default logging detail level is used. +#org.slf4j.simpleLogger.log.xxxxx= + +# Set to true if you want the current date and time to be included in output messages. +# Default is false, and will output the number of milliseconds elapsed since startup. +#org.slf4j.simpleLogger.showDateTime=false + +# The date and time format to be used in the output messages. +# The pattern describing the date and time format is the same that is used in java.text.SimpleDateFormat. +# If the format is not specified or is invalid, the default format is used. +# The default format is yyyy-MM-dd HH:mm:ss:SSS Z. +#org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z + +# Set to true if you want to output the current thread name. +# Defaults to true. +org.slf4j.simpleLogger.showThreadName=true + +# Set to true if you want the Logger instance name to be included in output messages. +# Defaults to true. +#org.slf4j.simpleLogger.showLogName=true + +# Set to true if you want the last component of the name to be included in output messages. +# Defaults to false. +#org.slf4j.simpleLogger.showShortLogName=false + + diff --git a/test/src/test/atriasoft/exml/generic/ExmlLocal.java b/test/src/test/atriasoft/exml/generic/ExmlLocal.java index ec4043c..072aa62 100644 --- a/test/src/test/atriasoft/exml/generic/ExmlLocal.java +++ b/test/src/test/atriasoft/exml/generic/ExmlLocal.java @@ -10,10 +10,12 @@ import org.atriasoft.exml.Exml; import org.atriasoft.exml.exception.ExmlException; import org.atriasoft.exml.model.XmlNode; import org.junit.jupiter.api.Assertions; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; class ExmlLocal { + final static Logger LOGGER = LoggerFactory.getLogger(ExmlLocal.class); // errorPos : -1 : no error , 1 : parsing error, 2 generation error, 3 comparaison error ???? public static void test(final String ref, final String input, final int errorPos) { ExmlLocal.test(ref, input, errorPos, false); @@ -21,7 +23,7 @@ class ExmlLocal { public static void test(final String ref, final String input, final int errorPos, final boolean caseInSensitive) { //doc.setCaseSensitive(!caseInSensitive); - Log.verbose("parse : \n" + input); + LOGGER.trace("parse : \n" + input); XmlNode root = null; try { root = Exml.parse(input); diff --git a/test/src/test/atriasoft/exml/generic/ExmlTestAll.java b/test/src/test/atriasoft/exml/generic/TestExmlAll.java similarity index 89% rename from test/src/test/atriasoft/exml/generic/ExmlTestAll.java rename to test/src/test/atriasoft/exml/generic/TestExmlAll.java index 0a72838..d913993 100644 --- a/test/src/test/atriasoft/exml/generic/ExmlTestAll.java +++ b/test/src/test/atriasoft/exml/generic/TestExmlAll.java @@ -7,13 +7,15 @@ package test.atriasoft.exml.generic; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestAll { +public class TestExmlAll { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlAll.class); @BeforeAll public static void beforeClass() { - Log.verbose("----------------------------------------------------------------"); + LOGGER.trace("----------------------------------------------------------------"); } @Test diff --git a/test/src/test/atriasoft/exml/generic/ExmlTestAttribute.java b/test/src/test/atriasoft/exml/generic/TestExmlAttribute.java similarity index 94% rename from test/src/test/atriasoft/exml/generic/ExmlTestAttribute.java rename to test/src/test/atriasoft/exml/generic/TestExmlAttribute.java index cdb7c75..4499713 100644 --- a/test/src/test/atriasoft/exml/generic/ExmlTestAttribute.java +++ b/test/src/test/atriasoft/exml/generic/TestExmlAttribute.java @@ -12,13 +12,15 @@ import org.atriasoft.exml.model.XmlElement; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestAttribute { +public class TestExmlAttribute { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlAttribute.class); @BeforeAll public static void beforeClass() { - Log.verbose("----------------------------------------------------------------"); + LOGGER.trace("----------------------------------------------------------------"); } @Test diff --git a/test/src/test/atriasoft/exml/generic/ExmlTestCData.java b/test/src/test/atriasoft/exml/generic/TestExmlCData.java similarity index 75% rename from test/src/test/atriasoft/exml/generic/ExmlTestCData.java rename to test/src/test/atriasoft/exml/generic/TestExmlCData.java index afb53e5..eaa9ef4 100644 --- a/test/src/test/atriasoft/exml/generic/ExmlTestCData.java +++ b/test/src/test/atriasoft/exml/generic/TestExmlCData.java @@ -10,13 +10,15 @@ import org.atriasoft.exml.model.XmlElement; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestCData { +public class TestExmlCData { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlCData.class); @BeforeAll public static void beforeClass() { - Log.verbose("----------------------------------------------------------------"); + LOGGER.trace("----------------------------------------------------------------"); } @Test diff --git a/test/src/test/atriasoft/exml/generic/ExmlTestComment.java b/test/src/test/atriasoft/exml/generic/TestExmlComment.java similarity index 84% rename from test/src/test/atriasoft/exml/generic/ExmlTestComment.java rename to test/src/test/atriasoft/exml/generic/TestExmlComment.java index f403b2b..5935c9c 100644 --- a/test/src/test/atriasoft/exml/generic/ExmlTestComment.java +++ b/test/src/test/atriasoft/exml/generic/TestExmlComment.java @@ -11,13 +11,16 @@ import org.atriasoft.exml.model.XmlNodeType; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestComment { + +public class TestExmlComment { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlComment.class); @BeforeAll public static void beforeClass() { - Log.verbose("----------------------------------------------------------------"); + LOGGER.trace("----------------------------------------------------------------"); } @Test diff --git a/test/src/test/atriasoft/exml/generic/ExmlTestDeclarationXML.java b/test/src/test/atriasoft/exml/generic/TestExmlDeclarationXML.java similarity index 90% rename from test/src/test/atriasoft/exml/generic/ExmlTestDeclarationXML.java rename to test/src/test/atriasoft/exml/generic/TestExmlDeclarationXML.java index 7e6eb58..ace7788 100644 --- a/test/src/test/atriasoft/exml/generic/ExmlTestDeclarationXML.java +++ b/test/src/test/atriasoft/exml/generic/TestExmlDeclarationXML.java @@ -11,13 +11,16 @@ import org.atriasoft.exml.model.XmlNodeType; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestDeclarationXML { + +public class TestExmlDeclarationXML { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlDeclarationXML.class); @BeforeAll public static void beforeClass() { - Log.verbose("----------------------------------------------------------------"); + LOGGER.trace("----------------------------------------------------------------"); } @Test diff --git a/test/src/test/atriasoft/exml/generic/ExmlTestElement.java b/test/src/test/atriasoft/exml/generic/TestExmlElement.java similarity index 93% rename from test/src/test/atriasoft/exml/generic/ExmlTestElement.java rename to test/src/test/atriasoft/exml/generic/TestExmlElement.java index 517cb33..4444239 100644 --- a/test/src/test/atriasoft/exml/generic/ExmlTestElement.java +++ b/test/src/test/atriasoft/exml/generic/TestExmlElement.java @@ -13,13 +13,16 @@ import org.atriasoft.exml.model.XmlNodeType; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestElement { + +public class TestExmlElement { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlElement.class); @BeforeAll public static void beforeClass() { - Log.verbose("----------------------------------------------------------------"); + LOGGER.trace("----------------------------------------------------------------"); } @Test diff --git a/test/src/test/atriasoft/exml/generic/ExmlTestParseAttribute.java b/test/src/test/atriasoft/exml/generic/TestExmlParseAttribute.java similarity index 90% rename from test/src/test/atriasoft/exml/generic/ExmlTestParseAttribute.java rename to test/src/test/atriasoft/exml/generic/TestExmlParseAttribute.java index 30002c7..d0f030a 100644 --- a/test/src/test/atriasoft/exml/generic/ExmlTestParseAttribute.java +++ b/test/src/test/atriasoft/exml/generic/TestExmlParseAttribute.java @@ -7,13 +7,16 @@ package test.atriasoft.exml.generic; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestParseAttribute { + +public class TestExmlParseAttribute { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlParseAttribute.class); @BeforeAll public static void beforeClass() { - Log.verbose("----------------------------------------------------------------"); + LOGGER.trace("----------------------------------------------------------------"); } @Test diff --git a/test/src/test/atriasoft/exml/generic/ExmlTestParseComment.java b/test/src/test/atriasoft/exml/generic/TestExmlParseComment.java similarity index 83% rename from test/src/test/atriasoft/exml/generic/ExmlTestParseComment.java rename to test/src/test/atriasoft/exml/generic/TestExmlParseComment.java index e204571..12870d2 100644 --- a/test/src/test/atriasoft/exml/generic/ExmlTestParseComment.java +++ b/test/src/test/atriasoft/exml/generic/TestExmlParseComment.java @@ -7,13 +7,16 @@ package test.atriasoft.exml.generic; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestParseComment { + +public class TestExmlParseComment { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlParseComment.class); @BeforeAll public static void beforeClass() { - Log.verbose("----------------------------------------------------------------"); + LOGGER.trace("----------------------------------------------------------------"); } @Test diff --git a/test/src/test/atriasoft/exml/generic/ExmlTestParseDeclaration.java b/test/src/test/atriasoft/exml/generic/TestExmlParseDeclaration.java similarity index 83% rename from test/src/test/atriasoft/exml/generic/ExmlTestParseDeclaration.java rename to test/src/test/atriasoft/exml/generic/TestExmlParseDeclaration.java index 906c741..9c0126f 100644 --- a/test/src/test/atriasoft/exml/generic/ExmlTestParseDeclaration.java +++ b/test/src/test/atriasoft/exml/generic/TestExmlParseDeclaration.java @@ -7,13 +7,16 @@ package test.atriasoft.exml.generic; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestParseDeclaration { + +public class TestExmlParseDeclaration { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlParseDeclaration.class); @BeforeAll public static void beforeClass() { - Log.verbose("----------------------------------------------------------------"); + LOGGER.trace("----------------------------------------------------------------"); } @Test diff --git a/test/src/test/atriasoft/exml/generic/ExmlTestParseElement.java b/test/src/test/atriasoft/exml/generic/TestExmlParseElement.java similarity index 87% rename from test/src/test/atriasoft/exml/generic/ExmlTestParseElement.java rename to test/src/test/atriasoft/exml/generic/TestExmlParseElement.java index 6937134..2411666 100644 --- a/test/src/test/atriasoft/exml/generic/ExmlTestParseElement.java +++ b/test/src/test/atriasoft/exml/generic/TestExmlParseElement.java @@ -7,15 +7,18 @@ package test.atriasoft.exml.generic; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestParseElement { + +public class TestExmlParseElement { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlParseElement.class); static String refOutputElement = ""; @BeforeAll public static void beforeClass() { - Log.verbose("----------------------------------------------------------------"); + LOGGER.trace("----------------------------------------------------------------"); } @Test diff --git a/test/src/test/atriasoft/exml/internal/Log.java b/test/src/test/atriasoft/exml/internal/Log.java deleted file mode 100644 index 0066f97..0000000 --- a/test/src/test/atriasoft/exml/internal/Log.java +++ /dev/null @@ -1,73 +0,0 @@ -/** @file - * @author Edouard DUPIN - * @copyright 2021, Edouard DUPIN, all right reserved - * @license MPL v2.0 (see license file) - */ -package test.atriasoft.exml.internal; - -import org.atriasoft.reggol.LogLevel; -import org.atriasoft.reggol.Logger; - -public class Log { - private static final String LIB_NAME = "exml-test"; - private static final String LIB_NAME_DRAW = Logger.getDrawableName(LIB_NAME); - private static final boolean PRINT_CRITICAL = Logger.getNeedPrint(LIB_NAME, LogLevel.CRITICAL); - private static final boolean PRINT_ERROR = Logger.getNeedPrint(LIB_NAME, LogLevel.ERROR); - private static final boolean PRINT_WARNING = Logger.getNeedPrint(LIB_NAME, LogLevel.WARNING); - private static final boolean PRINT_INFO = Logger.getNeedPrint(LIB_NAME, LogLevel.INFO); - private static final boolean PRINT_DEBUG = Logger.getNeedPrint(LIB_NAME, LogLevel.DEBUG); - private static final boolean PRINT_VERBOSE = Logger.getNeedPrint(LIB_NAME, LogLevel.VERBOSE); - private static final boolean PRINT_TODO = Logger.getNeedPrint(LIB_NAME, LogLevel.TODO); - private static final boolean PRINT_PRINT = Logger.getNeedPrint(LIB_NAME, LogLevel.PRINT); - - public static void critical(final String data) { - if (PRINT_CRITICAL) { - Logger.critical(LIB_NAME_DRAW, data); - } - } - - public static void debug(final String data) { - if (PRINT_DEBUG) { - Logger.debug(LIB_NAME_DRAW, data); - } - } - - public static void error(final String data) { - if (PRINT_ERROR) { - Logger.error(LIB_NAME_DRAW, data); - } - } - - public static void info(final String data) { - if (PRINT_INFO) { - Logger.info(LIB_NAME_DRAW, data); - } - } - - public static void print(final String data) { - if (PRINT_PRINT) { - Logger.print(LIB_NAME_DRAW, data); - } - } - - public static void todo(final String data) { - if (PRINT_TODO) { - Logger.todo(LIB_NAME_DRAW, data); - } - } - - public static void verbose(final String data) { - if (PRINT_VERBOSE) { - Logger.verbose(LIB_NAME_DRAW, data); - } - } - - public static void warning(final String data) { - if (PRINT_WARNING) { - Logger.warning(LIB_NAME_DRAW, data); - } - } - - private Log() {} - -} diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospection.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospection.java similarity index 98% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospection.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospection.java index 9df6a79..4fe776e 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospection.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospection.java @@ -13,8 +13,10 @@ import org.atriasoft.exml.exception.ExmlParserErrorMulti; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; +import test.atriasoft.exml.generic.TestExmlAttribute; import test.atriasoft.exml.introspection.model.ClassMethodEnum; import test.atriasoft.exml.introspection.model.ClassPublicMemberOnly; import test.atriasoft.exml.introspection.model.ClassPublicMethodOnly; @@ -22,10 +24,11 @@ import test.atriasoft.exml.introspection.model.ClassPublicMethodeNode; import test.atriasoft.exml.introspection.model.ClassPublicMethodeStructured; import test.atriasoft.exml.introspection.model.SimpleEnum; -public class ExmlTestIntrospection { +public class TestExmlIntrospection { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospection.class); @BeforeAll public static void beforeClass() { - Log.verbose("----------------------------------------------------------------"); + LOGGER.trace("----------------------------------------------------------------"); } @Test diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionBoolean.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionBoolean.java similarity index 94% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionBoolean.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionBoolean.java index 88d9647..d3b73f6 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionBoolean.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionBoolean.java @@ -13,10 +13,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionBoolean { + +public class TestExmlIntrospectionBoolean { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionBoolean.class); @AknotDefaultAttribute public class TestArrayBoolean { public Boolean[] values; @@ -176,7 +179,7 @@ public class ExmlTestIntrospectionBoolean { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } @Test @@ -187,7 +190,7 @@ public class ExmlTestIntrospectionBoolean { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -220,7 +223,7 @@ public class ExmlTestIntrospectionBoolean { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -253,7 +256,7 @@ public class ExmlTestIntrospectionBoolean { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayBoolean root = Assertions.assertDoesNotThrow(() -> { @@ -277,7 +280,7 @@ public class ExmlTestIntrospectionBoolean { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayBooleanFunc root = Assertions.assertDoesNotThrow(() -> { @@ -301,7 +304,7 @@ public class ExmlTestIntrospectionBoolean { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" false @@ -332,7 +335,7 @@ public class ExmlTestIntrospectionBoolean { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" false @@ -365,7 +368,7 @@ public class ExmlTestIntrospectionBoolean { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestBoolean root = Assertions.assertDoesNotThrow(() -> { @@ -388,7 +391,7 @@ public class ExmlTestIntrospectionBoolean { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestBooleanFunc root = Assertions.assertDoesNotThrow(() -> { @@ -409,7 +412,7 @@ public class ExmlTestIntrospectionBoolean { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestListBoolean root = Assertions.assertDoesNotThrow(() -> { @@ -433,7 +436,7 @@ public class ExmlTestIntrospectionBoolean { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestListBooleanFunc root = Assertions.assertDoesNotThrow(() -> { @@ -457,7 +460,7 @@ public class ExmlTestIntrospectionBoolean { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" false @@ -488,7 +491,7 @@ public class ExmlTestIntrospectionBoolean { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" false @@ -521,7 +524,7 @@ public class ExmlTestIntrospectionBoolean { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" false @@ -548,7 +551,7 @@ public class ExmlTestIntrospectionBoolean { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" false diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionBooleanNative.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionBooleanNative.java similarity index 93% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionBooleanNative.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionBooleanNative.java index efafa47..3964022 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionBooleanNative.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionBooleanNative.java @@ -11,10 +11,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionBooleanNative { + +public class TestExmlIntrospectionBooleanNative { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionBooleanNative.class); @AknotDefaultAttribute public class TestArrayBooleanFunc { private boolean[] values; @@ -114,7 +117,7 @@ public class ExmlTestIntrospectionBooleanNative { @BeforeAll public static void beforeClass() { - Log.verbose("----------------------------------------------------------------"); + LOGGER.trace("----------------------------------------------------------------"); } @Test @@ -125,7 +128,7 @@ public class ExmlTestIntrospectionBooleanNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -159,7 +162,7 @@ public class ExmlTestIntrospectionBooleanNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayBooleanFunc root = Assertions.assertDoesNotThrow(() -> { @@ -183,7 +186,7 @@ public class ExmlTestIntrospectionBooleanNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayBooleanNative root = Assertions.assertDoesNotThrow(() -> { @@ -207,7 +210,7 @@ public class ExmlTestIntrospectionBooleanNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" false @@ -238,7 +241,7 @@ public class ExmlTestIntrospectionBooleanNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" false @@ -270,7 +273,7 @@ public class ExmlTestIntrospectionBooleanNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestBooleanFunc root = Assertions.assertDoesNotThrow(() -> { @@ -291,7 +294,7 @@ public class ExmlTestIntrospectionBooleanNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestBooleanNative root = Assertions.assertDoesNotThrow(() -> { @@ -312,7 +315,7 @@ public class ExmlTestIntrospectionBooleanNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" false @@ -337,7 +340,7 @@ public class ExmlTestIntrospectionBooleanNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" false diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionByte.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionByte.java similarity index 94% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionByte.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionByte.java index 613ad2a..a26bc8c 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionByte.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionByte.java @@ -13,10 +13,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionByte { + +public class TestExmlIntrospectionByte { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionByte.class); @AknotDefaultAttribute public class TestArrayByte { public Byte[] values; @@ -202,7 +205,7 @@ public class ExmlTestIntrospectionByte { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } @Test @@ -213,7 +216,7 @@ public class ExmlTestIntrospectionByte { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -246,7 +249,7 @@ public class ExmlTestIntrospectionByte { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -279,7 +282,7 @@ public class ExmlTestIntrospectionByte { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -312,7 +315,7 @@ public class ExmlTestIntrospectionByte { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -345,7 +348,7 @@ public class ExmlTestIntrospectionByte { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayByte root = Assertions.assertDoesNotThrow(() -> { @@ -369,7 +372,7 @@ public class ExmlTestIntrospectionByte { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayByteFunc root = Assertions.assertDoesNotThrow(() -> { @@ -393,7 +396,7 @@ public class ExmlTestIntrospectionByte { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12 @@ -424,7 +427,7 @@ public class ExmlTestIntrospectionByte { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12 @@ -457,7 +460,7 @@ public class ExmlTestIntrospectionByte { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestByte root = Assertions.assertDoesNotThrow(() -> { @@ -480,7 +483,7 @@ public class ExmlTestIntrospectionByte { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestByteFunc root = Assertions.assertDoesNotThrow(() -> { @@ -501,7 +504,7 @@ public class ExmlTestIntrospectionByte { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestListByte root = Assertions.assertDoesNotThrow(() -> { @@ -525,7 +528,7 @@ public class ExmlTestIntrospectionByte { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestListByteFunc root = Assertions.assertDoesNotThrow(() -> { @@ -549,7 +552,7 @@ public class ExmlTestIntrospectionByte { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12 @@ -580,7 +583,7 @@ public class ExmlTestIntrospectionByte { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); final String dataGenerated = """ 12 @@ -589,7 +592,7 @@ public class ExmlTestIntrospectionByte { 78 -127 """; - Log.warning("compared with: " + dataGenerated); + LOGGER.warn("compared with: " + dataGenerated); Assertions.assertEquals(dataGenerated, dataTest); final TestListNodeByteFunc root = Assertions.assertDoesNotThrow(() -> { @@ -615,7 +618,7 @@ public class ExmlTestIntrospectionByte { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 11 @@ -642,7 +645,7 @@ public class ExmlTestIntrospectionByte { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 54 diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionByteNative.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionByteNative.java similarity index 93% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionByteNative.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionByteNative.java index 1dbd60d..2c6dafd 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionByteNative.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionByteNative.java @@ -11,10 +11,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionByteNative { + +public class TestExmlIntrospectionByteNative { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionByteNative.class); @AknotDefaultAttribute public class TestArrayByteFunc { private byte[] values; @@ -127,7 +130,7 @@ public class ExmlTestIntrospectionByteNative { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } @Test @@ -138,7 +141,7 @@ public class ExmlTestIntrospectionByteNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -171,7 +174,7 @@ public class ExmlTestIntrospectionByteNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -205,7 +208,7 @@ public class ExmlTestIntrospectionByteNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayByteFunc root = Assertions.assertDoesNotThrow(() -> { @@ -229,7 +232,7 @@ public class ExmlTestIntrospectionByteNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayByteNative root = Assertions.assertDoesNotThrow(() -> { @@ -253,7 +256,7 @@ public class ExmlTestIntrospectionByteNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12 @@ -284,7 +287,7 @@ public class ExmlTestIntrospectionByteNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12 @@ -316,7 +319,7 @@ public class ExmlTestIntrospectionByteNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestbyteFunc root = Assertions.assertDoesNotThrow(() -> { @@ -337,7 +340,7 @@ public class ExmlTestIntrospectionByteNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestByteNative root = Assertions.assertDoesNotThrow(() -> { @@ -358,7 +361,7 @@ public class ExmlTestIntrospectionByteNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 54 @@ -383,7 +386,7 @@ public class ExmlTestIntrospectionByteNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 11 diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDecoratorAttribute.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDecoratorAttribute.java similarity index 97% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDecoratorAttribute.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDecoratorAttribute.java index f90705e..fbea7a4 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDecoratorAttribute.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDecoratorAttribute.java @@ -12,10 +12,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionDecoratorAttribute { + +public class TestExmlIntrospectionDecoratorAttribute { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionDecoratorAttribute.class); @AknotDefaultAttribute public class TestNodeObject { @@ -438,7 +441,7 @@ public class ExmlTestIntrospectionDecoratorAttribute { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } // ************************************************************ @@ -462,7 +465,7 @@ public class ExmlTestIntrospectionDecoratorAttribute { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + dataTest); + LOGGER.warn("data generated: " + dataTest); Assertions.assertEquals( """ @@ -523,7 +526,7 @@ public class ExmlTestIntrospectionDecoratorAttribute { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals( """ @@ -589,7 +592,7 @@ public class ExmlTestIntrospectionDecoratorAttribute { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals( """ diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDecoratorCaseSensitive.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDecoratorCaseSensitive.java similarity index 98% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDecoratorCaseSensitive.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDecoratorCaseSensitive.java index baf83ca..cf901b6 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDecoratorCaseSensitive.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDecoratorCaseSensitive.java @@ -15,10 +15,13 @@ import org.atriasoft.exml.exception.ExmlNodeDoesNotExist; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionDecoratorCaseSensitive { + +public class TestExmlIntrospectionDecoratorCaseSensitive { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionDecoratorCaseSensitive.class); @AknotDefaultCaseSensitive @AknotDefaultAttribute public class TestAttributeObject { @@ -862,7 +865,7 @@ public class ExmlTestIntrospectionDecoratorCaseSensitive { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } // ************************************************************ // ** CaseSensitive @@ -886,7 +889,7 @@ public class ExmlTestIntrospectionDecoratorCaseSensitive { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + dataTest); + LOGGER.warn("data generated: " + dataTest); final String[] testThatWork = { """ @@ -1047,7 +1050,7 @@ public class ExmlTestIntrospectionDecoratorCaseSensitive { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + dataTest); + LOGGER.warn("data generated: " + dataTest); final String[] testThatWork = { """ @@ -1127,7 +1130,7 @@ public class ExmlTestIntrospectionDecoratorCaseSensitive { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); final String[] testThatWork = { """ @@ -1271,7 +1274,7 @@ public class ExmlTestIntrospectionDecoratorCaseSensitive { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); final String[] testThatWork = { """ @@ -1345,7 +1348,7 @@ public class ExmlTestIntrospectionDecoratorCaseSensitive { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); final String[] testThatWork = { """ @@ -1504,7 +1507,7 @@ public class ExmlTestIntrospectionDecoratorCaseSensitive { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); final String[] testThatWork = { """ diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDecoratorManaged.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDecoratorManaged.java similarity index 97% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDecoratorManaged.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDecoratorManaged.java index 125e063..fe2537c 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDecoratorManaged.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDecoratorManaged.java @@ -12,10 +12,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionDecoratorManaged { + +public class TestExmlIntrospectionDecoratorManaged { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionDecoratorManaged.class); @AknotDefaultManaged public class TestNodeObject { public int valueA; @@ -467,7 +470,7 @@ public class ExmlTestIntrospectionDecoratorManaged { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } // ************************************************************ @@ -491,7 +494,7 @@ public class ExmlTestIntrospectionDecoratorManaged { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 321 @@ -562,7 +565,7 @@ public class ExmlTestIntrospectionDecoratorManaged { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 654 @@ -627,7 +630,7 @@ public class ExmlTestIntrospectionDecoratorManaged { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 321 diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDecoratorNames.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDecoratorNames.java similarity index 97% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDecoratorNames.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDecoratorNames.java index 68b2e39..aa02ba0 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDecoratorNames.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDecoratorNames.java @@ -12,10 +12,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionDecoratorNames { + +public class TestExmlIntrospectionDecoratorNames { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionDecoratorNames.class); public class ChangingNames { private String value1RataPlouf; @AknotName("value2") @@ -467,7 +470,7 @@ public class ExmlTestIntrospectionDecoratorNames { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } // ************************************************************ // ** Attribute @@ -484,7 +487,7 @@ public class ExmlTestIntrospectionDecoratorNames { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 51 @@ -520,7 +523,7 @@ public class ExmlTestIntrospectionDecoratorNames { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + dataTest); + LOGGER.warn("data generated: " + dataTest); Assertions.assertEquals( """ @@ -581,7 +584,7 @@ public class ExmlTestIntrospectionDecoratorNames { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals( """ @@ -647,7 +650,7 @@ public class ExmlTestIntrospectionDecoratorNames { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals( """ diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDecoratorOptionnal.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDecoratorOptionnal.java similarity index 97% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDecoratorOptionnal.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDecoratorOptionnal.java index 206f259..b57ef42 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDecoratorOptionnal.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDecoratorOptionnal.java @@ -12,10 +12,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionDecoratorOptionnal { + +public class TestExmlIntrospectionDecoratorOptionnal { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionDecoratorOptionnal.class); @AknotDefaultOptional public class TestNodeObject { @@ -438,7 +441,7 @@ public class ExmlTestIntrospectionDecoratorOptionnal { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } // ************************************************************ @@ -462,7 +465,7 @@ public class ExmlTestIntrospectionDecoratorOptionnal { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + dataTest); + LOGGER.warn("data generated: " + dataTest); Assertions.assertEquals(""" 321 @@ -538,7 +541,7 @@ public class ExmlTestIntrospectionDecoratorOptionnal { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 321 @@ -614,7 +617,7 @@ public class ExmlTestIntrospectionDecoratorOptionnal { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 321 diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDouble.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDouble.java similarity index 94% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDouble.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDouble.java index c88f9ee..d67c496 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDouble.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDouble.java @@ -13,10 +13,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionDouble { + +public class TestExmlIntrospectionDouble { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionDouble.class); @AknotDefaultAttribute public class TestArrayDouble { public Double[] values; @@ -176,7 +179,7 @@ public class ExmlTestIntrospectionDouble { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } @Test @@ -187,7 +190,7 @@ public class ExmlTestIntrospectionDouble { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -220,7 +223,7 @@ public class ExmlTestIntrospectionDouble { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -253,7 +256,7 @@ public class ExmlTestIntrospectionDouble { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayDouble root = Assertions.assertDoesNotThrow(() -> { @@ -277,7 +280,7 @@ public class ExmlTestIntrospectionDouble { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayDoubleFunc root = Assertions.assertDoesNotThrow(() -> { @@ -301,7 +304,7 @@ public class ExmlTestIntrospectionDouble { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12.0 @@ -332,7 +335,7 @@ public class ExmlTestIntrospectionDouble { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12.0 @@ -365,7 +368,7 @@ public class ExmlTestIntrospectionDouble { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestDouble root = Assertions.assertDoesNotThrow(() -> { @@ -388,7 +391,7 @@ public class ExmlTestIntrospectionDouble { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestDoubleFunc root = Assertions.assertDoesNotThrow(() -> { @@ -409,7 +412,7 @@ public class ExmlTestIntrospectionDouble { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestListDouble root = Assertions.assertDoesNotThrow(() -> { @@ -433,7 +436,7 @@ public class ExmlTestIntrospectionDouble { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestListDoubleFunc root = Assertions.assertDoesNotThrow(() -> { @@ -457,7 +460,7 @@ public class ExmlTestIntrospectionDouble { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12.0 @@ -488,7 +491,7 @@ public class ExmlTestIntrospectionDouble { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12.0 @@ -521,7 +524,7 @@ public class ExmlTestIntrospectionDouble { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 11.0 @@ -548,7 +551,7 @@ public class ExmlTestIntrospectionDouble { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 54.0 diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDoubleNative.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDoubleNative.java similarity index 93% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDoubleNative.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDoubleNative.java index 08d3326..1ff8e84 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionDoubleNative.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionDoubleNative.java @@ -11,10 +11,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionDoubleNative { + +public class TestExmlIntrospectionDoubleNative { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionDoubleNative.class); @AknotDefaultAttribute public class TestArrayDoubleFunc { private double[] values; @@ -114,7 +117,7 @@ public class ExmlTestIntrospectionDoubleNative { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } @Test @@ -125,7 +128,7 @@ public class ExmlTestIntrospectionDoubleNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -158,7 +161,7 @@ public class ExmlTestIntrospectionDoubleNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayDoubleFunc root = Assertions.assertDoesNotThrow(() -> { @@ -182,7 +185,7 @@ public class ExmlTestIntrospectionDoubleNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayDoubleNative root = Assertions.assertDoesNotThrow(() -> { @@ -206,7 +209,7 @@ public class ExmlTestIntrospectionDoubleNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12.0 @@ -237,7 +240,7 @@ public class ExmlTestIntrospectionDoubleNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12.0 @@ -269,7 +272,7 @@ public class ExmlTestIntrospectionDoubleNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestdoubleFunc root = Assertions.assertDoesNotThrow(() -> { @@ -290,7 +293,7 @@ public class ExmlTestIntrospectionDoubleNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestDoubleNative root = Assertions.assertDoesNotThrow(() -> { @@ -311,7 +314,7 @@ public class ExmlTestIntrospectionDoubleNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 54.0 @@ -336,7 +339,7 @@ public class ExmlTestIntrospectionDoubleNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 11.0 diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionEnum.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionEnum.java similarity index 94% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionEnum.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionEnum.java index c65ed1d..d3c9146 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionEnum.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionEnum.java @@ -13,10 +13,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionEnum { + +public class TestExmlIntrospectionEnum { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionEnum.class); @AknotDefaultAttribute public class TestArrayEnum { public TestEnumVal[] values; @@ -160,7 +163,7 @@ public class ExmlTestIntrospectionEnum { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } @Test @@ -171,7 +174,7 @@ public class ExmlTestIntrospectionEnum { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -204,7 +207,7 @@ public class ExmlTestIntrospectionEnum { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -237,7 +240,7 @@ public class ExmlTestIntrospectionEnum { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayEnum root = Assertions.assertDoesNotThrow(() -> { @@ -261,7 +264,7 @@ public class ExmlTestIntrospectionEnum { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayEnumFunc root = Assertions.assertDoesNotThrow(() -> { @@ -285,7 +288,7 @@ public class ExmlTestIntrospectionEnum { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" VALUE_1 @@ -316,7 +319,7 @@ public class ExmlTestIntrospectionEnum { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" VALUE_1 @@ -348,7 +351,7 @@ public class ExmlTestIntrospectionEnum { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestEnum root = Assertions.assertDoesNotThrow(() -> { @@ -369,7 +372,7 @@ public class ExmlTestIntrospectionEnum { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestEnumFunc root = Assertions.assertDoesNotThrow(() -> { @@ -389,7 +392,7 @@ public class ExmlTestIntrospectionEnum { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestListEnum root = Assertions.assertDoesNotThrow(() -> { @@ -413,7 +416,7 @@ public class ExmlTestIntrospectionEnum { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestListEnumFunc root = Assertions.assertDoesNotThrow(() -> { @@ -437,7 +440,7 @@ public class ExmlTestIntrospectionEnum { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" VALUE_1 @@ -468,7 +471,7 @@ public class ExmlTestIntrospectionEnum { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" VALUE_1 @@ -500,7 +503,7 @@ public class ExmlTestIntrospectionEnum { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" VALUE_3 @@ -525,7 +528,7 @@ public class ExmlTestIntrospectionEnum { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" VALUE_2 diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionFloat.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionFloat.java similarity index 94% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionFloat.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionFloat.java index a47c25c..cc75e5f 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionFloat.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionFloat.java @@ -13,10 +13,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionFloat { + +public class TestExmlIntrospectionFloat { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionFloat.class); @AknotDefaultAttribute public class TestArrayFloat { public Float[] values; @@ -176,7 +179,7 @@ public class ExmlTestIntrospectionFloat { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } @Test @@ -187,7 +190,7 @@ public class ExmlTestIntrospectionFloat { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -220,7 +223,7 @@ public class ExmlTestIntrospectionFloat { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -253,7 +256,7 @@ public class ExmlTestIntrospectionFloat { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayFloat root = Assertions.assertDoesNotThrow(() -> { @@ -277,7 +280,7 @@ public class ExmlTestIntrospectionFloat { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayFloatFunc root = Assertions.assertDoesNotThrow(() -> { @@ -301,7 +304,7 @@ public class ExmlTestIntrospectionFloat { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12.0 @@ -332,7 +335,7 @@ public class ExmlTestIntrospectionFloat { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12.0 @@ -365,7 +368,7 @@ public class ExmlTestIntrospectionFloat { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestFloat root = Assertions.assertDoesNotThrow(() -> { @@ -388,7 +391,7 @@ public class ExmlTestIntrospectionFloat { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestFloatFunc root = Assertions.assertDoesNotThrow(() -> { @@ -409,7 +412,7 @@ public class ExmlTestIntrospectionFloat { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestListFloat root = Assertions.assertDoesNotThrow(() -> { @@ -433,7 +436,7 @@ public class ExmlTestIntrospectionFloat { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestListFloatFunc root = Assertions.assertDoesNotThrow(() -> { @@ -457,7 +460,7 @@ public class ExmlTestIntrospectionFloat { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12.0 @@ -488,7 +491,7 @@ public class ExmlTestIntrospectionFloat { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12.0 @@ -521,7 +524,7 @@ public class ExmlTestIntrospectionFloat { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 11.0 @@ -548,7 +551,7 @@ public class ExmlTestIntrospectionFloat { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 54.0 diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionFloatNative.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionFloatNative.java similarity index 93% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionFloatNative.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionFloatNative.java index f7723b2..2bc69ad 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionFloatNative.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionFloatNative.java @@ -11,10 +11,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionFloatNative { + +public class TestExmlIntrospectionFloatNative { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionFloatNative.class); @AknotDefaultAttribute public class TestArrayFloatFunc { private float[] values; @@ -114,7 +117,7 @@ public class ExmlTestIntrospectionFloatNative { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } @Test @@ -125,7 +128,7 @@ public class ExmlTestIntrospectionFloatNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -158,7 +161,7 @@ public class ExmlTestIntrospectionFloatNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayFloatFunc root = Assertions.assertDoesNotThrow(() -> { @@ -182,7 +185,7 @@ public class ExmlTestIntrospectionFloatNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayFloatNative root = Assertions.assertDoesNotThrow(() -> { @@ -206,7 +209,7 @@ public class ExmlTestIntrospectionFloatNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12.0 @@ -237,7 +240,7 @@ public class ExmlTestIntrospectionFloatNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12.0 @@ -269,7 +272,7 @@ public class ExmlTestIntrospectionFloatNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestfloatFunc root = Assertions.assertDoesNotThrow(() -> { @@ -290,7 +293,7 @@ public class ExmlTestIntrospectionFloatNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestFloatNative root = Assertions.assertDoesNotThrow(() -> { @@ -311,7 +314,7 @@ public class ExmlTestIntrospectionFloatNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 54.0 @@ -336,7 +339,7 @@ public class ExmlTestIntrospectionFloatNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 11.0 diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionGenerate.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionGenerate.java similarity index 91% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionGenerate.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionGenerate.java index 9c2c2be..eae5bbc 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionGenerate.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionGenerate.java @@ -11,18 +11,21 @@ import org.atriasoft.exml.exception.ExmlParserErrorMulti; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + -import test.atriasoft.exml.internal.Log; import test.atriasoft.exml.introspection.model.ClassPublicMemberOnly; import test.atriasoft.exml.introspection.model.ClassPublicMethodOnly; import test.atriasoft.exml.introspection.model.ClassPublicMethodeNode; -public class ExmlTestIntrospectionGenerate { +public class TestExmlIntrospectionGenerate { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionGenerate.class); private static final String NODE_NAME = "elem"; @BeforeAll public static void beforeClass() { - Log.verbose("----------------------------------------------------------------"); + LOGGER.trace("----------------------------------------------------------------"); } @Test @@ -52,7 +55,7 @@ public class ExmlTestIntrospectionGenerate { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); } @Test @@ -82,7 +85,7 @@ public class ExmlTestIntrospectionGenerate { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); } @Test @@ -112,7 +115,7 @@ public class ExmlTestIntrospectionGenerate { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); } } diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionInteger.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionInteger.java similarity index 94% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionInteger.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionInteger.java index ee95e4a..cf46f9f 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionInteger.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionInteger.java @@ -13,10 +13,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionInteger { + +public class TestExmlIntrospectionInteger { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionInteger.class); @AknotDefaultAttribute public class TestArrayInteger { public Integer[] values; @@ -176,7 +179,7 @@ public class ExmlTestIntrospectionInteger { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } @Test @@ -187,7 +190,7 @@ public class ExmlTestIntrospectionInteger { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -220,7 +223,7 @@ public class ExmlTestIntrospectionInteger { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -253,7 +256,7 @@ public class ExmlTestIntrospectionInteger { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayInteger root = Assertions.assertDoesNotThrow(() -> { @@ -277,7 +280,7 @@ public class ExmlTestIntrospectionInteger { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayIntegerFunc root = Assertions.assertDoesNotThrow(() -> { @@ -301,7 +304,7 @@ public class ExmlTestIntrospectionInteger { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12 @@ -332,7 +335,7 @@ public class ExmlTestIntrospectionInteger { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12 @@ -365,7 +368,7 @@ public class ExmlTestIntrospectionInteger { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestInteger root = Assertions.assertDoesNotThrow(() -> { @@ -388,7 +391,7 @@ public class ExmlTestIntrospectionInteger { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestIntegerFunc root = Assertions.assertDoesNotThrow(() -> { @@ -409,7 +412,7 @@ public class ExmlTestIntrospectionInteger { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestListInteger root = Assertions.assertDoesNotThrow(() -> { @@ -433,7 +436,7 @@ public class ExmlTestIntrospectionInteger { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestListIntegerFunc root = Assertions.assertDoesNotThrow(() -> { @@ -457,7 +460,7 @@ public class ExmlTestIntrospectionInteger { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12 @@ -488,7 +491,7 @@ public class ExmlTestIntrospectionInteger { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12 @@ -521,7 +524,7 @@ public class ExmlTestIntrospectionInteger { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 11 @@ -548,7 +551,7 @@ public class ExmlTestIntrospectionInteger { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 54 diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionIntegerNative.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionIntegerNative.java similarity index 93% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionIntegerNative.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionIntegerNative.java index 4c32619..b4eee51 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionIntegerNative.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionIntegerNative.java @@ -11,10 +11,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionIntegerNative { + +public class TestExmlIntrospectionIntegerNative { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionIntegerNative.class); @AknotDefaultAttribute public class TestArrayIntegerFunc { private int[] values; @@ -114,7 +117,7 @@ public class ExmlTestIntrospectionIntegerNative { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } @Test @@ -125,7 +128,7 @@ public class ExmlTestIntrospectionIntegerNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -159,7 +162,7 @@ public class ExmlTestIntrospectionIntegerNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayIntegerFunc root = Assertions.assertDoesNotThrow(() -> { @@ -183,7 +186,7 @@ public class ExmlTestIntrospectionIntegerNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayIntegerNative root = Assertions.assertDoesNotThrow(() -> { @@ -207,7 +210,7 @@ public class ExmlTestIntrospectionIntegerNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12 @@ -238,7 +241,7 @@ public class ExmlTestIntrospectionIntegerNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12 @@ -270,7 +273,7 @@ public class ExmlTestIntrospectionIntegerNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestintFunc root = Assertions.assertDoesNotThrow(() -> { @@ -291,7 +294,7 @@ public class ExmlTestIntrospectionIntegerNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestIntegerNative root = Assertions.assertDoesNotThrow(() -> { @@ -312,7 +315,7 @@ public class ExmlTestIntrospectionIntegerNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 54 @@ -337,7 +340,7 @@ public class ExmlTestIntrospectionIntegerNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 11 diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionObject.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionObject.java similarity index 95% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionObject.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionObject.java index d9ca61c..0aa3e6e 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionObject.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionObject.java @@ -13,10 +13,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionObject { + +public class TestExmlIntrospectionObject { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionObject.class); public class SimpleObject { @AknotAttribute public int value1; @@ -115,7 +118,7 @@ public class ExmlTestIntrospectionObject { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } @Test @@ -132,7 +135,7 @@ public class ExmlTestIntrospectionObject { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -174,7 +177,7 @@ public class ExmlTestIntrospectionObject { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -216,7 +219,7 @@ public class ExmlTestIntrospectionObject { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -260,7 +263,7 @@ public class ExmlTestIntrospectionObject { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -302,7 +305,7 @@ public class ExmlTestIntrospectionObject { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -344,7 +347,7 @@ public class ExmlTestIntrospectionObject { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -387,7 +390,7 @@ public class ExmlTestIntrospectionObject { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -422,7 +425,7 @@ public class ExmlTestIntrospectionObject { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionObjectConstructor.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionObjectConstructor.java similarity index 89% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionObjectConstructor.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionObjectConstructor.java index c7d25a9..903a91d 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionObjectConstructor.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionObjectConstructor.java @@ -11,10 +11,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionObjectConstructor { + +public class TestExmlIntrospectionObjectConstructor { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionObjectConstructor.class); public class TestConstructorSpecific { @AknotAttribute public Integer valueA; @@ -55,7 +58,7 @@ public class ExmlTestIntrospectionObjectConstructor { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } @Test @@ -64,7 +67,7 @@ public class ExmlTestIntrospectionObjectConstructor { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 18523.0 @@ -85,7 +88,7 @@ public class ExmlTestIntrospectionObjectConstructor { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 18523.0 @@ -106,7 +109,7 @@ public class ExmlTestIntrospectionObjectConstructor { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 18523.0 diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionRecord.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionRecord.java similarity index 85% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionRecord.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionRecord.java index fe64696..3bce452 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionRecord.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionRecord.java @@ -11,10 +11,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionRecord { + +public class TestExmlIntrospectionRecord { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionRecord.class); public record TestRecord( @AknotName("valueA") Integer valueA, @AknotName("valueB") double valueB) {} @@ -27,7 +30,7 @@ public class ExmlTestIntrospectionRecord { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } @Test @@ -36,7 +39,7 @@ public class ExmlTestIntrospectionRecord { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 66 @@ -58,7 +61,7 @@ public class ExmlTestIntrospectionRecord { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestRecordProperty root = Assertions.assertDoesNotThrow(() -> { diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionShort.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionShort.java similarity index 94% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionShort.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionShort.java index 01d425c..f30440f 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionShort.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionShort.java @@ -13,10 +13,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionShort { + +public class TestExmlIntrospectionShort { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionShort.class); public class TestArrayNodeShort { public Short[] values; } @@ -176,7 +179,7 @@ public class ExmlTestIntrospectionShort { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } @Test @@ -187,7 +190,7 @@ public class ExmlTestIntrospectionShort { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -220,7 +223,7 @@ public class ExmlTestIntrospectionShort { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -253,7 +256,7 @@ public class ExmlTestIntrospectionShort { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12 @@ -284,7 +287,7 @@ public class ExmlTestIntrospectionShort { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12 @@ -315,7 +318,7 @@ public class ExmlTestIntrospectionShort { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayShort root = Assertions.assertDoesNotThrow(() -> { @@ -339,7 +342,7 @@ public class ExmlTestIntrospectionShort { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayShortFunc root = Assertions.assertDoesNotThrow(() -> { @@ -363,7 +366,7 @@ public class ExmlTestIntrospectionShort { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12 @@ -394,7 +397,7 @@ public class ExmlTestIntrospectionShort { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12 @@ -425,7 +428,7 @@ public class ExmlTestIntrospectionShort { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestListShort root = Assertions.assertDoesNotThrow(() -> { @@ -449,7 +452,7 @@ public class ExmlTestIntrospectionShort { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestListShortFunc root = Assertions.assertDoesNotThrow(() -> { @@ -475,7 +478,7 @@ public class ExmlTestIntrospectionShort { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 11 @@ -502,7 +505,7 @@ public class ExmlTestIntrospectionShort { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 54 @@ -529,7 +532,7 @@ public class ExmlTestIntrospectionShort { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestShort root = Assertions.assertDoesNotThrow(() -> { @@ -552,7 +555,7 @@ public class ExmlTestIntrospectionShort { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestShortFunc root = Assertions.assertDoesNotThrow(() -> { diff --git a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionShortNative.java b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionShortNative.java similarity index 93% rename from test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionShortNative.java rename to test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionShortNative.java index 7fa42be..15484be 100644 --- a/test/src/test/atriasoft/exml/introspection/ExmlTestIntrospectionShortNative.java +++ b/test/src/test/atriasoft/exml/introspection/TestExmlIntrospectionShortNative.java @@ -11,10 +11,13 @@ import org.atriasoft.exml.XmlMapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import test.atriasoft.exml.internal.Log; -public class ExmlTestIntrospectionShortNative { + +public class TestExmlIntrospectionShortNative { + final static Logger LOGGER = LoggerFactory.getLogger(TestExmlIntrospectionShortNative.class); public class TestArrayNodeShortFunc { private short[] values; @@ -114,7 +117,7 @@ public class ExmlTestIntrospectionShortNative { @BeforeAll public static void beforeClass() { - Log.warning("================================================================"); + LOGGER.warn("================================================================"); } @Test @@ -125,7 +128,7 @@ public class ExmlTestIntrospectionShortNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" @@ -158,7 +161,7 @@ public class ExmlTestIntrospectionShortNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12 @@ -189,7 +192,7 @@ public class ExmlTestIntrospectionShortNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 12 @@ -220,7 +223,7 @@ public class ExmlTestIntrospectionShortNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayShortFunc root = Assertions.assertDoesNotThrow(() -> { @@ -244,7 +247,7 @@ public class ExmlTestIntrospectionShortNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestArrayShortNative root = Assertions.assertDoesNotThrow(() -> { @@ -269,7 +272,7 @@ public class ExmlTestIntrospectionShortNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 54 @@ -294,7 +297,7 @@ public class ExmlTestIntrospectionShortNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals(""" 11 @@ -319,7 +322,7 @@ public class ExmlTestIntrospectionShortNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestshortFunc root = Assertions.assertDoesNotThrow(() -> { @@ -340,7 +343,7 @@ public class ExmlTestIntrospectionShortNative { final StringBuilder builder = new StringBuilder(); Assertions.assertDoesNotThrow(() -> (new XmlMapper()).generate(elem, builder)); final String dataTest = builder.toString(); - Log.warning("data generated: " + builder.toString()); + LOGGER.warn("data generated: " + builder.toString()); Assertions.assertEquals("", dataTest); final TestShortNative root = Assertions.assertDoesNotThrow(() -> {