From 2eec8760e8045c9035522cda946e019f4dad0d46 Mon Sep 17 00:00:00 2001 From: mindula Date: Wed, 21 Aug 2024 09:33:40 +0530 Subject: [PATCH] Rename test files --- .../XMLToRecordConverterTests.java | 42 +++++++++---------- .../{sample_35.bal => sample_39.bal} | 0 .../{sample_36.bal => sample_40.bal} | 0 .../{sample_37.bal => sample_41.bal} | 0 .../{sample_38.bal => sample_42.bal} | 0 .../xml/{sample_35.xml => sample_38.xml} | 0 .../xml/{sample_36.xml => sample_39.xml} | 0 7 files changed, 21 insertions(+), 21 deletions(-) rename misc/xml-to-record-converter/src/test/resources/ballerina/{sample_35.bal => sample_39.bal} (100%) rename misc/xml-to-record-converter/src/test/resources/ballerina/{sample_36.bal => sample_40.bal} (100%) rename misc/xml-to-record-converter/src/test/resources/ballerina/{sample_37.bal => sample_41.bal} (100%) rename misc/xml-to-record-converter/src/test/resources/ballerina/{sample_38.bal => sample_42.bal} (100%) rename misc/xml-to-record-converter/src/test/resources/xml/{sample_35.xml => sample_38.xml} (100%) rename misc/xml-to-record-converter/src/test/resources/xml/{sample_36.xml => sample_39.xml} (100%) diff --git a/misc/xml-to-record-converter/src/test/java/io/ballerina/xmltorecordconverter/XMLToRecordConverterTests.java b/misc/xml-to-record-converter/src/test/java/io/ballerina/xmltorecordconverter/XMLToRecordConverterTests.java index 442c3ad1cbb9..c2090ffc32c4 100644 --- a/misc/xml-to-record-converter/src/test/java/io/ballerina/xmltorecordconverter/XMLToRecordConverterTests.java +++ b/misc/xml-to-record-converter/src/test/java/io/ballerina/xmltorecordconverter/XMLToRecordConverterTests.java @@ -214,19 +214,19 @@ public class XMLToRecordConverterTests { private final Path sample34Bal = RES_DIR.resolve(BAL_DIR) .resolve("sample_34.bal"); - private final Path sample35XML = RES_DIR.resolve(XML_DIR) - .resolve("sample_35.xml"); - private final Path sample35Bal = RES_DIR.resolve(BAL_DIR) - .resolve("sample_35.bal"); - private final Path sample36Bal = RES_DIR.resolve(BAL_DIR) - .resolve("sample_36.bal"); - - private final Path sample36XML = RES_DIR.resolve(XML_DIR) - .resolve("sample_36.xml"); - private final Path sample37Bal = RES_DIR.resolve(BAL_DIR) - .resolve("sample_37.bal"); - private final Path sample38Bal = RES_DIR.resolve(BAL_DIR) - .resolve("sample_38.bal"); + private final Path sample38XML = RES_DIR.resolve(XML_DIR) + .resolve("sample_38.xml"); + private final Path sample39Bal = RES_DIR.resolve(BAL_DIR) + .resolve("sample_39.bal"); + private final Path sample40Bal = RES_DIR.resolve(BAL_DIR) + .resolve("sample_40.bal"); + + private final Path sample39XML = RES_DIR.resolve(XML_DIR) + .resolve("sample_39.xml"); + private final Path sample41Bal = RES_DIR.resolve(BAL_DIR) + .resolve("sample_41.bal"); + private final Path sample42Bal = RES_DIR.resolve(BAL_DIR) + .resolve("sample_42.bal"); private static final String XMLToRecordServiceEP = "xmlToRecord/convert"; @@ -567,37 +567,37 @@ public void textXMLWithDefaultValueNode2() throws IOException { @Test(description = "textXMLWithoutAttributes") public void textXMLWithoutAttributes() throws IOException { - String xmlFileContent = Files.readString(sample35XML); + String xmlFileContent = Files.readString(sample38XML); String generatedCodeBlock = XMLToRecordConverter.convert(xmlFileContent, false, false, false, null, true, true, false).getCodeBlock().replaceAll("\\s+", ""); - String expectedCodeBlock = Files.readString(sample35Bal).replaceAll("\\s+", ""); + String expectedCodeBlock = Files.readString(sample39Bal).replaceAll("\\s+", ""); Assert.assertEquals(generatedCodeBlock, expectedCodeBlock); } @Test(description = "textXMLWithoutAttributeAnnotation") public void textXMLWithoutAttributeAnnotation() throws IOException { - String xmlFileContent = Files.readString(sample35XML); + String xmlFileContent = Files.readString(sample38XML); String generatedCodeBlock = XMLToRecordConverter.convert(xmlFileContent, false, false, false, "__text", false, false, true).getCodeBlock().replaceAll("\\s+", ""); - String expectedCodeBlock = Files.readString(sample36Bal).replaceAll("\\s+", ""); + String expectedCodeBlock = Files.readString(sample40Bal).replaceAll("\\s+", ""); Assert.assertEquals(generatedCodeBlock, expectedCodeBlock); } @Test(description = "textXMLWithoutMultipleAttributeAnnotation") public void textXMLWithoutMultipleAttributeAnnotation() throws IOException { - String xmlFileContent = Files.readString(sample36XML); + String xmlFileContent = Files.readString(sample39XML); String generatedCodeBlock = XMLToRecordConverter.convert(xmlFileContent, false, false, false, "__text", false, false, true).getCodeBlock().replaceAll("\\s+", ""); - String expectedCodeBlock = Files.readString(sample37Bal).replaceAll("\\s+", ""); + String expectedCodeBlock = Files.readString(sample41Bal).replaceAll("\\s+", ""); Assert.assertEquals(generatedCodeBlock, expectedCodeBlock); } @Test(description = "textXMLWithNamespacesAndWithoutAttributeAnnotation") public void textXMLWithNamespacesAndWithoutAttributeAnnotation() throws IOException { - String xmlFileContent = Files.readString(sample36XML); + String xmlFileContent = Files.readString(sample39XML); String generatedCodeBlock = XMLToRecordConverter.convert(xmlFileContent, false, false, false, "__text", true, false, true).getCodeBlock().replaceAll("\\s+", ""); - String expectedCodeBlock = Files.readString(sample38Bal).replaceAll("\\s+", ""); + String expectedCodeBlock = Files.readString(sample42Bal).replaceAll("\\s+", ""); Assert.assertEquals(generatedCodeBlock, expectedCodeBlock); } } diff --git a/misc/xml-to-record-converter/src/test/resources/ballerina/sample_35.bal b/misc/xml-to-record-converter/src/test/resources/ballerina/sample_39.bal similarity index 100% rename from misc/xml-to-record-converter/src/test/resources/ballerina/sample_35.bal rename to misc/xml-to-record-converter/src/test/resources/ballerina/sample_39.bal diff --git a/misc/xml-to-record-converter/src/test/resources/ballerina/sample_36.bal b/misc/xml-to-record-converter/src/test/resources/ballerina/sample_40.bal similarity index 100% rename from misc/xml-to-record-converter/src/test/resources/ballerina/sample_36.bal rename to misc/xml-to-record-converter/src/test/resources/ballerina/sample_40.bal diff --git a/misc/xml-to-record-converter/src/test/resources/ballerina/sample_37.bal b/misc/xml-to-record-converter/src/test/resources/ballerina/sample_41.bal similarity index 100% rename from misc/xml-to-record-converter/src/test/resources/ballerina/sample_37.bal rename to misc/xml-to-record-converter/src/test/resources/ballerina/sample_41.bal diff --git a/misc/xml-to-record-converter/src/test/resources/ballerina/sample_38.bal b/misc/xml-to-record-converter/src/test/resources/ballerina/sample_42.bal similarity index 100% rename from misc/xml-to-record-converter/src/test/resources/ballerina/sample_38.bal rename to misc/xml-to-record-converter/src/test/resources/ballerina/sample_42.bal diff --git a/misc/xml-to-record-converter/src/test/resources/xml/sample_35.xml b/misc/xml-to-record-converter/src/test/resources/xml/sample_38.xml similarity index 100% rename from misc/xml-to-record-converter/src/test/resources/xml/sample_35.xml rename to misc/xml-to-record-converter/src/test/resources/xml/sample_38.xml diff --git a/misc/xml-to-record-converter/src/test/resources/xml/sample_36.xml b/misc/xml-to-record-converter/src/test/resources/xml/sample_39.xml similarity index 100% rename from misc/xml-to-record-converter/src/test/resources/xml/sample_36.xml rename to misc/xml-to-record-converter/src/test/resources/xml/sample_39.xml