@@ -57,7 +57,7 @@ public void testJsonCreation() throws Exception {
57
57
MapSwaggerStore store = new MapSwaggerStore ();
58
58
ResourceListing resourceListing = createResourceListingForCreationTesting (store , SwaggerFormat .json );
59
59
60
- String json = store .getFileMap ().get ("api-docs" ).toString ();
60
+ String json = store .getFileMap ().get ("api-docs.json " ).toString ();
61
61
assertTrue (json .length () > 0 );
62
62
63
63
JsonReader reader = Json .createReader (new StringReader (json ));
@@ -66,7 +66,7 @@ public void testJsonCreation() throws Exception {
66
66
67
67
System .out .println ( json );
68
68
69
- json = store .getFileMap ().get ("/user.json" ).toString ();
69
+ json = store .getFileMap ().get ("api-docs /user.json" ).toString ();
70
70
System .out .println ("Created: " + json );
71
71
reader = Json .createReader (new StringReader (json ));
72
72
JsonObject object = reader .readObject ();
@@ -118,7 +118,7 @@ public void testXmlCreation() throws Exception {
118
118
MapSwaggerStore store = new MapSwaggerStore ();
119
119
ResourceListing resourceListing = createResourceListingForCreationTesting (store , SwaggerFormat .xml );
120
120
121
- String xml = store .getFileMap ().get ("api-docs" ).toString ();
121
+ String xml = store .getFileMap ().get ("api-docs.xml " ).toString ();
122
122
assertTrue (xml .length () > 0 );
123
123
124
124
Document document = DocumentBuilderFactory .newInstance ().newDocumentBuilder ().parse (new InputSource ( new StringReader (xml )));
@@ -128,7 +128,7 @@ public void testXmlCreation() throws Exception {
128
128
SwaggerVersion swaggerVersion = resourceListing .getSwaggerVersion ();
129
129
assertEquals (swaggerVersion .getIdentifier (), elm .getTextContent ());
130
130
131
- xml = store .getFileMap ().get ("/user.xml" ).toString ();
131
+ xml = store .getFileMap ().get ("api-docs /user.xml" ).toString ();
132
132
document = DocumentBuilderFactory .newInstance ().newDocumentBuilder ().parse (new InputSource (new StringReader (xml )));
133
133
documentElement = document .getDocumentElement ();
134
134
assertEquals (Constants .API_DOCUMENTATION , documentElement .getNodeName ());
@@ -154,13 +154,13 @@ private MapSwaggerStore testCreation(SwaggerFactory factory, ResourceListing res
154
154
swaggerWriter .writeSwagger (store , resourceListing );
155
155
156
156
assertEquals (3 , store .getFileMap ().size ());
157
- assertTrue (store .getFileMap ().containsKey ("api-docs" ));
157
+ assertTrue (store .getFileMap ().containsKey ("api-docs.xml " ));
158
158
159
159
swaggerWriter = factory .createSwaggerWriter (SwaggerFormat .json );
160
160
swaggerWriter .writeSwagger (store , resourceListing );
161
161
162
- assertEquals (5 , store .getFileMap ().size ());
163
- assertTrue (store .getFileMap ().containsKey ("api-docs" ));
162
+ assertEquals (6 , store .getFileMap ().size ());
163
+ assertTrue (store .getFileMap ().containsKey ("api-docs.json " ));
164
164
165
165
return store ;
166
166
}
0 commit comments