@@ -41,88 +41,88 @@ public static void initializeStatic() throws Exception {
4141
4242 @ Test
4343 public void simpleDefaultFormat () throws Throwable {
44- String output = format (TEST_DATA .input ("xml_space.xml " ), config -> {});
44+ String output = format (TEST_DATA .input ("xml_space.test " ), config -> {});
4545 assertEquals ("Unexpected formatting with default preferences." ,
46- TEST_DATA .expected ("xml_space.xml " ), output );
46+ TEST_DATA .expected ("xml_space.test " ), output );
4747 }
4848
4949 @ Test
5050 public void invalidXmlFormat () throws Throwable {
51- String [] input = TEST_DATA .input ("xml_space.xml " );
51+ String [] input = TEST_DATA .input ("xml_space.test " );
5252 input [0 ] += INCOMPLETE ;
5353 String output = format (input , config -> {});
54- String expected = TEST_DATA .expected ("xml_space.xml " ) + LINE_DELIMITER + INCOMPLETE ;
54+ String expected = TEST_DATA .expected ("xml_space.test " ) + LINE_DELIMITER + INCOMPLETE ;
5555 assertEquals ("Incomplete XML not formatted on best effort basis." ,
5656 expected , output );
5757 }
5858
5959 @ Test
6060 public void illegalXmlCharater () throws Throwable {
61- String [] input = TEST_DATA .input ("xml_space.xml " );
61+ String [] input = TEST_DATA .input ("xml_space.test " );
6262 input [0 ] = ILLEGAL_CHAR + input [0 ];
6363 String output = format (input , config -> {});
64- String expected = LINE_DELIMITER + LINE_DELIMITER + TEST_DATA .expected ("xml_space.xml " );
64+ String expected = LINE_DELIMITER + LINE_DELIMITER + TEST_DATA .expected ("xml_space.test " );
6565 assertEquals ("Illegal character not replaced by line delimiter." , expected , output );
6666 }
6767
6868 @ Test
6969 public void multipleConfigurations () throws Throwable {
70- String output = format (TEST_DATA .input ("xml_space.xml " ), config -> {
70+ String output = format (TEST_DATA .input ("xml_space.test " ), config -> {
7171 config .setProperty (INDENTATION_SIZE , "2" );
7272 config .setProperty (INDENTATION_CHAR , SPACE );
7373 });
74- String expected = TEST_DATA .expected ("xml_space.xml " ).replace ("\t " , " " );
74+ String expected = TEST_DATA .expected ("xml_space.test " ).replace ("\t " , " " );
7575 assertEquals ("Custom indentation configuration not applied." , expected , output );
7676
77- output = format (TEST_DATA .input ("xml_space.xml " ), config -> {
77+ output = format (TEST_DATA .input ("xml_space.test " ), config -> {
7878 config .setProperty (SPLIT_MULTI_ATTRS , Boolean .toString (true ));
7979 });
80- expected = TEST_DATA .expected ("xml_space.xml " );
80+ expected = TEST_DATA .expected ("xml_space.test " );
8181 expected = expected .replace (" a=" , LINE_DELIMITER + "\t a=" );
8282 expected = expected .replace (" b=" , LINE_DELIMITER + "\t b=" );
8383 assertEquals ("Custom indentation configuration not reverted or custom multiple argument configuration not applied." , expected , output );
8484 }
8585
8686 @ Test
8787 public void invalidConfiguration () throws Throwable {
88- String output = format (TEST_DATA .input ("xml_space.xml " ), config -> {
88+ String output = format (TEST_DATA .input ("xml_space.test " ), config -> {
8989 config .setProperty (INDENTATION_SIZE , "Not an integer" );
9090 config .setProperty (INDENTATION_CHAR , SPACE );
9191 });
9292 assertEquals ("Invalid indentation configuration not replaced by default value (0 spaces)" ,
93- TEST_DATA .expected ("xml_space.xml " ).replace ("\t " , "" ), output );
93+ TEST_DATA .expected ("xml_space.test " ).replace ("\t " , "" ), output );
9494 }
9595
9696 @ Test
9797 public void dtdRelativePath () throws Throwable {
98- String output = format (TEST_DATA .input ("dtd_relative.xml " ), config -> {});
98+ String output = format (TEST_DATA .input ("dtd_relative.test " ), config -> {});
9999 assertEquals ("Relative DTD not resolved. Restrictions are not applied by formatter." ,
100- TEST_DATA .expected ("dtd_relative.xml " ), output );
100+ TEST_DATA .expected ("dtd_relative.test " ), output );
101101 }
102102
103103 @ Test
104104 public void xsdRelativePath () throws Throwable {
105- String output = format (TEST_DATA .input ("xsd_relative.xml " ), config -> {});
105+ String output = format (TEST_DATA .input ("xsd_relative.test " ), config -> {});
106106 assertEquals ("Relative XSD not resolved. Restrictions are not applied by formatter." ,
107- TEST_DATA .expected ("xsd_relative.xml " ), output );
107+ TEST_DATA .expected ("xsd_relative.test " ), output );
108108 }
109109
110110 @ Test
111111 public void xsdNotFound () throws Throwable {
112- String output = format (TEST_DATA .input ("xsd_not_found.xml " ), config -> {});
112+ String output = format (TEST_DATA .input ("xsd_not_found.test " ), config -> {});
113113 assertEquals ("Unresolved XSD/DTD not silently ignored." ,
114- TEST_DATA .expected ("xsd_not_found.xml " ), output );
114+ TEST_DATA .expected ("xsd_not_found.test " ), output );
115115 }
116116
117117 @ Test
118118 public void catalogLookup () throws Throwable {
119- String output = format (TEST_DATA .input ("xsd_not_found.xml " ), config -> {
119+ String output = format (TEST_DATA .input ("xsd_not_found.test " ), config -> {
120120 config .setProperty (
121121 SpotlessPreferences .USER_CATALOG ,
122122 TEST_DATA .getRestrictionsPath ("catalog.xml" ).toString ());
123123 });
124124 assertEquals ("XSD not resolved by catalog. Restrictions are not applied by formatter." ,
125- TEST_DATA .expected ("xsd_not_found.xml " ).replace (" remove spaces " , "remove spaces" ), output );
125+ TEST_DATA .expected ("xsd_not_found.test " ).replace (" remove spaces " , "remove spaces" ), output );
126126 }
127127
128128 private static String format (final String [] input , final Consumer <Properties > config ) throws Exception {
0 commit comments