@@ -18,7 +18,7 @@ class ParameterTest extends FlatSpec with ShouldMatchers with TestBase {
18
18
val jsonSchema = factory.getJsonSchema(schema.get(" definitions" ).get(" parameter" ))
19
19
20
20
it should " validate a string query parameter" in {
21
- val json = Source .fromFile(" samples /v2.0/json/resources/parameters/queryStringParameter.json" ).mkString
21
+ val json = Source .fromFile(" fixtures /v2.0/json/resources/parameters/queryStringParameter.json" ).mkString
22
22
val data = JsonLoader .fromString(json)
23
23
val report = jsonSchema.validate(data)
24
24
if (report.isSuccess == false )
@@ -27,7 +27,7 @@ class ParameterTest extends FlatSpec with ShouldMatchers with TestBase {
27
27
}
28
28
29
29
it should " validate an int64 array query parameter" in {
30
- val json = Source .fromFile(" samples /v2.0/json/resources/parameters/queryInt64ArrayParameter.json" ).mkString
30
+ val json = Source .fromFile(" fixtures /v2.0/json/resources/parameters/queryInt64ArrayParameter.json" ).mkString
31
31
val data = JsonLoader .fromString(json)
32
32
val report = jsonSchema.validate(data)
33
33
if (report.isSuccess == false )
@@ -36,14 +36,14 @@ class ParameterTest extends FlatSpec with ShouldMatchers with TestBase {
36
36
}
37
37
38
38
it should " fail to validate a complex query parameter" in {
39
- val json = Source .fromFile(" samples /v2.0/json/resources/parameters/queryWithComplexParameter.json" ).mkString
39
+ val json = Source .fromFile(" fixtures /v2.0/json/resources/parameters/queryWithComplexParameter.json" ).mkString
40
40
val data = JsonLoader .fromString(json)
41
41
val report = jsonSchema.validate(data)
42
42
report.isSuccess should be (false )
43
43
}
44
44
45
45
it should " validate a string header parameter" in {
46
- val json = Source .fromFile(" samples /v2.0/json/resources/parameters/headerStringParameter.json" ).mkString
46
+ val json = Source .fromFile(" fixtures /v2.0/json/resources/parameters/headerStringParameter.json" ).mkString
47
47
val data = JsonLoader .fromString(json)
48
48
val report = jsonSchema.validate(data)
49
49
if (report.isSuccess == false )
@@ -52,7 +52,7 @@ class ParameterTest extends FlatSpec with ShouldMatchers with TestBase {
52
52
}
53
53
54
54
it should " validate a string array header parameter" in {
55
- val json = Source .fromFile(" samples /v2.0/json/resources/parameters/headerStringArrayParameter.json" ).mkString
55
+ val json = Source .fromFile(" fixtures /v2.0/json/resources/parameters/headerStringArrayParameter.json" ).mkString
56
56
val data = JsonLoader .fromString(json)
57
57
val report = jsonSchema.validate(data)
58
58
if (report.isSuccess == false )
@@ -61,7 +61,7 @@ class ParameterTest extends FlatSpec with ShouldMatchers with TestBase {
61
61
}
62
62
63
63
it should " validate a int64 array header parameter" in {
64
- val json = Source .fromFile(" samples /v2.0/json/resources/parameters/headerInt64ArrayParameter.json" ).mkString
64
+ val json = Source .fromFile(" fixtures /v2.0/json/resources/parameters/headerInt64ArrayParameter.json" ).mkString
65
65
val data = JsonLoader .fromString(json)
66
66
val report = jsonSchema.validate(data)
67
67
if (report.isSuccess == false )
@@ -70,7 +70,7 @@ class ParameterTest extends FlatSpec with ShouldMatchers with TestBase {
70
70
}
71
71
72
72
it should " validate a string path parameter" in {
73
- val json = Source .fromFile(" samples /v2.0/json/resources/parameters/pathStringParameter.json" ).mkString
73
+ val json = Source .fromFile(" fixtures /v2.0/json/resources/parameters/pathStringParameter.json" ).mkString
74
74
val data = JsonLoader .fromString(json)
75
75
val report = jsonSchema.validate(data)
76
76
if (report.isSuccess == false )
@@ -79,7 +79,7 @@ class ParameterTest extends FlatSpec with ShouldMatchers with TestBase {
79
79
}
80
80
81
81
it should " validate a int64 path parameter" in {
82
- val json = Source .fromFile(" samples /v2.0/json/resources/parameters/pathInt64Parameter.json" ).mkString
82
+ val json = Source .fromFile(" fixtures /v2.0/json/resources/parameters/pathInt64Parameter.json" ).mkString
83
83
val data = JsonLoader .fromString(json)
84
84
val report = jsonSchema.validate(data)
85
85
if (report.isSuccess == false )
@@ -88,7 +88,7 @@ class ParameterTest extends FlatSpec with ShouldMatchers with TestBase {
88
88
}
89
89
90
90
it should " validate a string array path parameter" in {
91
- val json = Source .fromFile(" samples /v2.0/json/resources/parameters/pathStringArrayParameter.json" ).mkString
91
+ val json = Source .fromFile(" fixtures /v2.0/json/resources/parameters/pathStringArrayParameter.json" ).mkString
92
92
val data = JsonLoader .fromString(json)
93
93
val report = jsonSchema.validate(data)
94
94
if (report.isSuccess == false )
@@ -97,7 +97,7 @@ class ParameterTest extends FlatSpec with ShouldMatchers with TestBase {
97
97
}
98
98
99
99
it should " validate an int64 body parameter" in {
100
- val json = Source .fromFile(" samples /v2.0/json/resources/parameters/bodyInt64Parameter.json" ).mkString
100
+ val json = Source .fromFile(" fixtures /v2.0/json/resources/parameters/bodyInt64Parameter.json" ).mkString
101
101
val data = JsonLoader .fromString(json)
102
102
val report = jsonSchema.validate(data)
103
103
if (report.isSuccess == false )
@@ -106,7 +106,7 @@ class ParameterTest extends FlatSpec with ShouldMatchers with TestBase {
106
106
}
107
107
108
108
it should " validate a string body parameter" in {
109
- val json = Source .fromFile(" samples /v2.0/json/resources/parameters/bodyStringParameter.json" ).mkString
109
+ val json = Source .fromFile(" fixtures /v2.0/json/resources/parameters/bodyStringParameter.json" ).mkString
110
110
val data = JsonLoader .fromString(json)
111
111
val report = jsonSchema.validate(data)
112
112
if (report.isSuccess == false )
@@ -115,7 +115,7 @@ class ParameterTest extends FlatSpec with ShouldMatchers with TestBase {
115
115
}
116
116
117
117
it should " validate a string array body parameter" in {
118
- val json = Source .fromFile(" samples /v2.0/json/resources/parameters/bodyStringArrayParameter.json" ).mkString
118
+ val json = Source .fromFile(" fixtures /v2.0/json/resources/parameters/bodyStringArrayParameter.json" ).mkString
119
119
val data = JsonLoader .fromString(json)
120
120
val report = jsonSchema.validate(data)
121
121
if (report.isSuccess == false )
@@ -124,7 +124,7 @@ class ParameterTest extends FlatSpec with ShouldMatchers with TestBase {
124
124
}
125
125
126
126
it should " validate a complex body parameter" in {
127
- val json = Source .fromFile(" samples /v2.0/json/resources/parameters/bodyComplexParameter.json" ).mkString
127
+ val json = Source .fromFile(" fixtures /v2.0/json/resources/parameters/bodyComplexParameter.json" ).mkString
128
128
val data = JsonLoader .fromString(json)
129
129
val report = jsonSchema.validate(data)
130
130
if (report.isSuccess == false )
@@ -133,7 +133,7 @@ class ParameterTest extends FlatSpec with ShouldMatchers with TestBase {
133
133
}
134
134
135
135
it should " validate a complex body array parameter" in {
136
- val json = Source .fromFile(" samples /v2.0/json/resources/parameters/bodyComplexArrayParameter.json" ).mkString
136
+ val json = Source .fromFile(" fixtures /v2.0/json/resources/parameters/bodyComplexArrayParameter.json" ).mkString
137
137
val data = JsonLoader .fromString(json)
138
138
val report = jsonSchema.validate(data)
139
139
if (report.isSuccess == false )
@@ -142,7 +142,7 @@ class ParameterTest extends FlatSpec with ShouldMatchers with TestBase {
142
142
}
143
143
144
144
it should " validate an int64 form data parameter" in {
145
- val json = Source .fromFile(" samples /v2.0/json/resources/parameters/formDataInt64Parameter.json" ).mkString
145
+ val json = Source .fromFile(" fixtures /v2.0/json/resources/parameters/formDataInt64Parameter.json" ).mkString
146
146
val data = JsonLoader .fromString(json)
147
147
val report = jsonSchema.validate(data)
148
148
if (report.isSuccess == false )
@@ -151,7 +151,7 @@ class ParameterTest extends FlatSpec with ShouldMatchers with TestBase {
151
151
}
152
152
153
153
it should " validate a string array form data parameter" in {
154
- val json = Source .fromFile(" samples /v2.0/json/resources/parameters/formDataStringArrayParameter.json" ).mkString
154
+ val json = Source .fromFile(" fixtures /v2.0/json/resources/parameters/formDataStringArrayParameter.json" ).mkString
155
155
val data = JsonLoader .fromString(json)
156
156
val report = jsonSchema.validate(data)
157
157
if (report.isSuccess == false )
@@ -160,9 +160,9 @@ class ParameterTest extends FlatSpec with ShouldMatchers with TestBase {
160
160
}
161
161
162
162
ignore should " fail to validate a complex form data parameter" in {
163
- val json = Source .fromFile(" samples /v2.0/json/resources/parameters/formDataComplexParameter.json" ).mkString
163
+ val json = Source .fromFile(" fixtures /v2.0/json/resources/parameters/formDataComplexParameter.json" ).mkString
164
164
val data = JsonLoader .fromString(json)
165
165
val report = jsonSchema.validate(data)
166
166
report.isSuccess should be (false )
167
167
}
168
- }
168
+ }
0 commit comments