[DEV] refactor

This commit is contained in:
Edouard DUPIN 2023-08-24 18:11:07 +02:00
parent 1b51e75970
commit e2637aecfc
68 changed files with 750 additions and 562 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<fileset name="all" enabled="true" check-config-name="Ewol" local="false">
<fileset name="all" enabled="true" check-config-name="Google Checks" local="false">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
</fileset-config>

View File

@ -1,15 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="out/eclipse/classes-test" path="test/src">
<classpathentry kind="src" output="out/maven/test-classes" path="test/src">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<classpathentry including="**/*.java" kind="src" output="out/maven/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-20">
<attributes>
<attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5">
@ -17,15 +24,10 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/atriasoft-aknot">
<classpathentry exported="true" kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/atriasoft-etk">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="out/eclipse/classes"/>
<classpathentry kind="output" path="out/maven/classes"/>
</classpath>

View File

@ -12,14 +12,26 @@
</arguments>
</buildCommand>
<buildCommand>
<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/net.sf.eclipsecs.core.CheckstyleBuilder (2).launch</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
<nature>org.python.pydev.pythonNature</nature>
</natures>
<filteredResources>
<filter>

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test/src" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="etk" exported="" />
<orderEntry type="library" scope="TEST" name="org.junit.jupiter:junit-jupiter-api:5.7.1" level="project" />
</component>
</module>

View File

@ -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',

127
pom.xml Normal file
View File

@ -0,0 +1,127 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.atriasoft</groupId>
<artifactId>exml</artifactId>
<version>0.1.0</version>
<properties>
<maven.compiler.version>3.11.0</maven.compiler.version>
<maven.compiler.source>20</maven.compiler.source>
<maven.compiler.target>20</maven.compiler.target>
</properties>
<repositories>
<repository>
<id>gitea</id>
<url>https://gitea.atria-soft.org/api/packages/jatria-soft/maven</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>gitea</id>
<url>https://gitea.atria-soft.org/api/packages/jatria-soft/maven</url>
</repository>
<snapshotRepository>
<id>gitea</id>
<url>https://gitea.atria-soft.org/api/packages/jatria-soft/maven</url>
</snapshotRepository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>jatria-soft</groupId>
<artifactId>etk</artifactId>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>jatria-soft</groupId>
<artifactId>aknot</artifactId>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.9.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.7</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test/src</testSourceDirectory>
<directory>${project.basedir}/out/maven/</directory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<!--<encoding>${project.build.sourceEncoding}</encoding>-->
</configuration>
</plugin>
<!-- Create the source bundle -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- junit results -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>fully.qualified.MainClass</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<!-- Java-doc generation for stand-alone site -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<show>private</show>
<nohelp>true</nohelp>
</configuration>
</plugin>
</plugins>
</build>
<!-- Generate Java-docs As Part Of Project Reports -->
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<show>public</show>
</configuration>
</plugin>
</plugins>
</reporting>
</project>

View File

@ -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;
}

View File

@ -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);

View File

@ -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);

View File

@ -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<ELEMENT>}

View File

@ -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) {

View File

@ -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<Object> 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<Object> 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);

View File

@ -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<Object>) 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<Object> nodeIn = (List<Object>) 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);
}

View File

@ -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
*/

View File

@ -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
*/

View File

@ -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
*/

View File

@ -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
*/

View File

@ -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);

View File

@ -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<ExmlParserError> errors; // list of errors

View File

@ -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);
}

View File

@ -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) {

View File

@ -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<MapKey, IntrospectionModel> 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<String> baseName = model.getNodeAvaillable();
@SuppressWarnings("unchecked")

View File

@ -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() {}
}

View File

@ -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);

View File

@ -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<XmlAttribute> 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;
}
}

View File

@ -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() {
}

View File

@ -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) {

View File

@ -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<XmlNode> 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;
}
}

View File

@ -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;

View File

@ -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: &lt;XXX&gt; ALL here &lt;/XXX&gt;
*/
public class XmlText extends XmlNode {
final static Logger LOGGER = LoggerFactory.getLogger(XmlText.class);
/**
* Constructor

View File

@ -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;
}

View File

@ -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()));
}
/**

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 = "<exemple/>";
@BeforeAll
public static void beforeClass() {
Log.verbose("----------------------------------------------------------------");
LOGGER.trace("----------------------------------------------------------------");
}
@Test

View File

@ -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() {}
}

View File

@ -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

View File

@ -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("""
<TestArrayNodeBooleanStructured>
<values>
@ -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("""
<TestListNodeBooleanStructured>
<values>
@ -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("<TestArrayBoolean values=\"false;false;true;false;true\"/>", 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("<TestArrayBooleanFunc values=\"false;false;true;false;true\"/>", 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("""
<TestArrayNodeBoolean>
<values>false</values>
@ -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("""
<TestArrayNodeBooleanFunc>
<values>false</values>
@ -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("<TestBoolean valueA=\"false\" valueB=\"true\"/>", 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("<TestBooleanFunc valueA=\"false\" valueB=\"true\"/>", 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("<TestListBoolean values=\"false;false;true;false;true\"/>", 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("<TestListBooleanFunc values=\"false;false;true;false;true\"/>", 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("""
<TestListNodeBoolean>
<values>false</values>
@ -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("""
<TestListNodeBooleanFunc>
<values>false</values>
@ -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("""
<TestNodeBoolean>
<valueA>false</valueA>
@ -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("""
<TestNodeBooleanFunc>
<valueA>false</valueA>

View File

@ -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("""
<TestArrayNodeBooleanNativeStructured>
<values>
@ -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("<TestArrayBooleanFunc values=\"false;false;true;false;true\"/>", 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("<TestArrayBooleanNative values=\"false;false;true;false;true\"/>", 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("""
<TestArrayNodeBooleanFunc>
<values>false</values>
@ -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("""
<TestArrayNodeBooleanNative>
<values>false</values>
@ -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("<TestBooleanFunc valueA=\"false\" valueB=\"true\"/>", 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("<TestBooleanNative valueA=\"false\" valueB=\"true\"/>", 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("""
<TestNodeBooleanFunc>
<valueA>false</valueA>
@ -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("""
<TestNodeBooleanNative>
<valueA>false</valueA>

View File

@ -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("""
<TestArrayNodeByteStructured>
<values>
@ -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("""
<TestArrayNodeByteStructuredFunc>
<values>
@ -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("""
<TestListNodeByteStructured>
<values>
@ -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("""
<TestListNodeByteStructuredFunc>
<values>
@ -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("<TestArrayByte values=\"12;-13;33;78;-127\"/>", 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("<TestArrayByteFunc values=\"12;-13;33;78;-127\"/>", 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("""
<TestArrayNodeByte>
<values>12</values>
@ -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("""
<TestArrayNodeByteFunc>
<values>12</values>
@ -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("<TestByte valueA=\"12\" valueB=\"-13\"/>", 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("<TestByteFunc valueA=\"-55\" valueB=\"57\"/>", 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("<TestListByte values=\"12;-13;33;78;-127\"/>", 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("<TestListByteFunc values=\"12;-13;33;78;-127\"/>", 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("""
<TestListNodeByte>
<values>12</values>
@ -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 = """
<TestListNodeByteFunc>
<values>12</values>
@ -589,7 +592,7 @@ public class ExmlTestIntrospectionByte {
<values>78</values>
<values>-127</values>
</TestListNodeByteFunc>""";
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("""
<TestNodeByte>
<valueA>11</valueA>
@ -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("""
<TestNodeByteFunc>
<valueA>54</valueA>

View File

@ -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("""
<TestArrayNodeByteNativeStructured>
<values>
@ -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("""
<TestArrayNodeByteNativeStructuredFunc>
<values>
@ -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("<TestArrayByteFunc values=\"12;-13;33;78;-127\"/>", 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("<TestArrayByteNative values=\"12;-13;33;78;-127\"/>", 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("""
<TestArrayNodeByteFunc>
<values>12</values>
@ -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("""
<TestArrayNodeByteNative>
<values>12</values>
@ -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("<TestbyteFunc valueA=\"-55\" valueB=\"57\"/>", 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("<TestByteNative valueA=\"12\" valueB=\"-13\"/>", 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("""
<TestNodebyteFunc>
<valueA>54</valueA>
@ -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("""
<TestNodeByteNative>
<valueA>11</valueA>

View File

@ -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(
"""
<TestNodeObject finalValueM="321" finalValueN="654" finalValueO="987" finalValueQ="267" finalValueR="264" finalValueS="1524" pFinalValueQ="-552" pFinalValueR="-965" pFinalValueS="-98885" valueA="55" valueB="78" valueC="51" valueE="651" valueF="654" valueG="8552" valueH="9531" valueI="87465">
@ -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(
"""
<TestNodeObjectFalse finalValueN="654" finalValueO="987" finalValueR="264" finalValueS="1524" pFinalValueR="-965" pFinalValueS="-98885" valueB="78" valueC="51" valueF="654" valueG="8552" valueH="9531" valueI="87465">
@ -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(
"""
<TestNodeObjectTrue finalValueM="321" finalValueN="654" finalValueO="987" finalValueQ="267" finalValueR="264" finalValueS="1524" pFinalValueQ="-552" pFinalValueR="-965" pFinalValueS="-98885" valueA="55" valueB="78" valueC="51" valueE="651" valueF="654" valueG="8552" valueH="9531" valueI="87465">

View File

@ -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 = { """
<TestNodeObject>
@ -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 = { """
<TestNodeObjectFalse>
@ -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 = { """
<TestNodeObjectTrue>
@ -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 = {
"""

View File

@ -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("""
<TestNodeObject>
<finalValueM>321</finalValueM>
@ -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("""
<TestNodeObjectFalse>
<finalValueN>654</finalValueN>
@ -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("""
<TestNodeObjectTrue>
<finalValueM>321</finalValueM>

View File

@ -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("""
<ChangingNames value3="24" value4="78">
<value1>51</value1>
@ -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(
"""
<TestNodeObject finalValueM="321" finalValueN="654" finalValueO="987" finalValueQ="267" finalValueR="264" finalValueS="1524" pFinalValueQ="-552" pFinalValueR="-965" pFinalValueS="-98885" valueA="55" valueB="78" valueC="51" valueE="651" valueF="654" valueG="8552" valueH="9531" valueI="87465">
@ -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(
"""
<TestNodeObjectFalse finalValueN="654" finalValueO="987" finalValueR="264" finalValueS="1524" pFinalValueR="-965" pFinalValueS="-98885" valueB="78" valueC="51" valueF="654" valueG="8552" valueH="9531" valueI="87465">
@ -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(
"""
<TestNodeObjectTrue finalValueM="321" finalValueN="654" finalValueO="987" finalValueQ="267" finalValueR="264" finalValueS="1524" pFinalValueQ="-552" pFinalValueR="-965" pFinalValueS="-98885" valueA="55" valueB="78" valueC="51" valueE="651" valueF="654" valueG="8552" valueH="9531" valueI="87465">

View File

@ -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("""
<TestNodeObject>
<finalValueM>321</finalValueM>
@ -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("""
<TestNodeObjectFalse>
<finalValueM>321</finalValueM>
@ -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("""
<TestNodeObjectTrue>
<finalValueM>321</finalValueM>

View File

@ -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("""
<TestArrayNodeDoubleStructured>
<values>
@ -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("""
<TestListNodeDoubleStructured>
<values>
@ -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("<TestArrayDouble values=\"12.0;-13.0;33.0;78.0;-127.0\"/>", 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("<TestArrayDoubleFunc values=\"12.0;-13.0;33.0;78.0;-127.0\"/>", 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("""
<TestArrayNodeDouble>
<values>12.0</values>
@ -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("""
<TestArrayNodeDoubleFunc>
<values>12.0</values>
@ -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("<TestDouble valueA=\"12.0\" valueB=\"-13.0\"/>", 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("<TestDoubleFunc valueA=\"-55.0\" valueB=\"57.0\"/>", 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("<TestListDouble values=\"12.0;-13.0;33.0;78.0;-127.0\"/>", 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("<TestListDoubleFunc values=\"12.0;-13.0;33.0;78.0;-127.0\"/>", 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("""
<TestListNodeDouble>
<values>12.0</values>
@ -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("""
<TestListNodeDoubleFunc>
<values>12.0</values>
@ -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("""
<TestNodeDouble>
<valueA>11.0</valueA>
@ -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("""
<TestNodeDoubleFunc>
<valueA>54.0</valueA>

View File

@ -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("""
<TestArrayNodeDoubleNativeStructured>
<values>
@ -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("<TestArrayDoubleFunc values=\"12.0;-13.0;33.0;78.0;-127.0\"/>", 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("<TestArrayDoubleNative values=\"12.0;-13.0;33.0;78.0;-127.0\"/>", 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("""
<TestArrayNodeDoubleFunc>
<values>12.0</values>
@ -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("""
<TestArrayNodeDoubleNative>
<values>12.0</values>
@ -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("<TestdoubleFunc valueA=\"-55.0\" valueB=\"57.0\"/>", 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("<TestDoubleNative valueA=\"12.0\" valueB=\"-13.0\"/>", 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("""
<TestNodedoubleFunc>
<valueA>54.0</valueA>
@ -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("""
<TestNodeDoubleNative>
<valueA>11.0</valueA>

View File

@ -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("""
<TestArrayNodeEnumStructured>
<values>
@ -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("""
<TestListNodeEnumStructured>
<values>
@ -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("<TestArrayEnum values=\"VALUE_1;VALUE_2;VALUE_3;VALUE_1;VALUE_2\"/>", 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("<TestArrayEnumFunc values=\"VALUE_1;VALUE_2;VALUE_3;VALUE_1;VALUE_2\"/>", 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("""
<TestArrayNodeEnum>
<values>VALUE_1</values>
@ -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("""
<TestArrayNodeEnumFunc>
<values>VALUE_1</values>
@ -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("<TestEnum valueA=\"VALUE_1\" valueB=\"VALUE_3\"/>", 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("<TestEnumFunc valueA=\"VALUE_1\" valueB=\"VALUE_2\"/>", 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("<TestListEnum values=\"VALUE_1;VALUE_2;VALUE_3;VALUE_1;VALUE_2\"/>", 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("<TestListEnumFunc values=\"VALUE_1;VALUE_2;VALUE_3;VALUE_1;VALUE_2\"/>", 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("""
<TestListNodeEnum>
<values>VALUE_1</values>
@ -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("""
<TestListNodeEnumFunc>
<values>VALUE_1</values>
@ -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("""
<TestNodeEnum>
<valueA>VALUE_3</valueA>
@ -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("""
<TestNodeEnumFunc>
<valueA>VALUE_2</valueA>

View File

@ -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("""
<TestArrayNodeFloatStructured>
<values>
@ -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("""
<TestListNodeByteStructured>
<values>
@ -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("<TestArrayFloat values=\"12.0;-13.0;33.0;78.0;-127.0\"/>", 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("<TestArrayFloatFunc values=\"12.0;-13.0;33.0;78.0;-127.0\"/>", 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("""
<TestArrayNodeFloat>
<values>12.0</values>
@ -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("""
<TestArrayNodeFloatFunc>
<values>12.0</values>
@ -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("<TestFloat valueA=\"12.0\" valueB=\"-13.0\"/>", 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("<TestFloatFunc valueA=\"-55.0\" valueB=\"57.0\"/>", 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("<TestListFloat values=\"12.0;-13.0;33.0;78.0;-127.0\"/>", 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("<TestListFloatFunc values=\"12.0;-13.0;33.0;78.0;-127.0\"/>", 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("""
<TestListNodeFloat>
<values>12.0</values>
@ -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("""
<TestListNodeFloatFunc>
<values>12.0</values>
@ -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("""
<TestNodeFloat>
<valueA>11.0</valueA>
@ -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("""
<TestNodeFloatFunc>
<valueA>54.0</valueA>

View File

@ -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("""
<TestArrayNodeFloatNativeStructured>
<values>
@ -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("<TestArrayFloatFunc values=\"12.0;-13.0;33.0;78.0;-127.0\"/>", 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("<TestArrayFloatNative values=\"12.0;-13.0;33.0;78.0;-127.0\"/>", 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("""
<TestArrayNodeFloatFunc>
<values>12.0</values>
@ -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("""
<TestArrayNodeFloatNative>
<values>12.0</values>
@ -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("<TestfloatFunc valueA=\"-55.0\" valueB=\"57.0\"/>", 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("<TestFloatNative valueA=\"12.0\" valueB=\"-13.0\"/>", 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("""
<TestNodefloatFunc>
<valueA>54.0</valueA>
@ -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("""
<TestNodeFloatNative>
<valueA>11.0</valueA>

View File

@ -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());
}
}

View File

@ -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("""
<TestArrayNodeIntegerStructured>
<values>
@ -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("""
<TestListNodeIntegerStructured>
<values>
@ -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("<TestArrayInteger values=\"12;-13;33;78;-127\"/>", 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("<TestArrayIntegerFunc values=\"12;-13;33;78;-127\"/>", 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("""
<TestArrayNodeInteger>
<values>12</values>
@ -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("""
<TestArrayNodeIntegerFunc>
<values>12</values>
@ -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("<TestInteger valueA=\"12\" valueB=\"-13\"/>", 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("<TestIntegerFunc valueA=\"-55\" valueB=\"57\"/>", 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("<TestListInteger values=\"12;-13;33;78;-127\"/>", 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("<TestListIntegerFunc values=\"12;-13;33;78;-127\"/>", 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("""
<TestListNodeInteger>
<values>12</values>
@ -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("""
<TestListNodeIntegerFunc>
<values>12</values>
@ -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("""
<TestNodeInteger>
<valueA>11</valueA>
@ -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("""
<TestNodeIntegerFunc>
<valueA>54</valueA>

View File

@ -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("""
<TestArrayNodeIntegerNativeStructured>
<values>
@ -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("<TestArrayIntegerFunc values=\"12;-13;33;78;-127\"/>", 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("<TestArrayIntegerNative values=\"12;-13;33;78;-127\"/>", 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("""
<TestArrayNodeIntegerFunc>
<values>12</values>
@ -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("""
<TestArrayNodeIntegerNative>
<values>12</values>
@ -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("<TestintFunc valueA=\"-55\" valueB=\"57\"/>", 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("<TestIntegerNative valueA=\"12\" valueB=\"-13\"/>", 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("""
<TestNodeintFunc>
<valueA>54</valueA>
@ -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("""
<TestNodeIntegerNative>
<valueA>11</valueA>

View File

@ -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("""
<TestArrayNodeObject>
<values value1="55">
@ -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("""
<TestArrayNodeObjectFunc>
<values value1="55">
@ -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("""
<TestArrayNodeStructuredObjectFunc>
<values>
@ -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("""
<TestListNodeObject>
<values value1="55">
@ -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("""
<TestListNodeObjectFunc>
<values value1="55">
@ -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("""
<TestListNodeStructuredObjectFunc>
<values>
@ -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("""
<TestNodeObject>
<valueA value1="55">
@ -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("""
<TestNodeObjectFunc>
<valueA value1="4564">

View File

@ -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("""
<TestConstructorSpecific valueA="66">
<valueB>18523.0</valueB>
@ -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("""
<TestConstructorSpecificParameter valueA="66">
<valueB>18523.0</valueB>
@ -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("""
<TestMultiConstructor valueA="66">
<valueB>18523.0</valueB>

View File

@ -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("""
<TestRecord>
<valueA>66</valueA>
@ -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("<TestRecordProperty valueA=\"66\" valueB=\"18523.0\"/>", dataTest);
final TestRecordProperty root = Assertions.assertDoesNotThrow(() -> {

View File

@ -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("""
<TestArrayNodeShortStructured>
<values>
@ -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("""
<TestListNodeShortStructured>
<values>
@ -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("""
<TestArrayNodeShort>
<values>12</values>
@ -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("""
<TestArrayNodeShortFunc>
<values>12</values>
@ -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("<TestArrayShort values=\"12;-13;33;78;-127\"/>", 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("<TestArrayShortFunc values=\"12;-13;33;78;-127\"/>", 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("""
<TestListNodeShort>
<values>12</values>
@ -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("""
<TestListNodeShortFunc>
<values>12</values>
@ -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("<TestListShort values=\"12;-13;33;78;-127\"/>", 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("<TestListShortFunc values=\"12;-13;33;78;-127\"/>", 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("""
<TestNodeShort>
<valueA>11</valueA>
@ -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("""
<TestNodeShortFunc>
<valueA>54</valueA>
@ -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("<TestShort valueA=\"12\" valueB=\"-13\"/>", 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("<TestShortFunc valueA=\"-55\" valueB=\"57\"/>", dataTest);
final TestShortFunc root = Assertions.assertDoesNotThrow(() -> {

View File

@ -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("""
<TestArrayNodeShortNativeStructured>
<values>
@ -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("""
<TestArrayNodeShortFunc>
<values>12</values>
@ -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("""
<TestArrayNodeShortNative>
<values>12</values>
@ -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("<TestArrayShortFunc values=\"12;-13;33;78;-127\"/>", 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("<TestArrayShortNative values=\"12;-13;33;78;-127\"/>", 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("""
<TestNodeshortFunc>
<valueA>54</valueA>
@ -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("""
<TestNodeShortNative>
<valueA>11</valueA>
@ -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("<TestshortFunc valueA=\"-55\" valueB=\"57\"/>", 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("<TestShortNative valueA=\"12\" valueB=\"-13\"/>", dataTest);
final TestShortNative root = Assertions.assertDoesNotThrow(() -> {