Skip to content

Commit f2a852c

Browse files
committed
[#9] - Replace double-quotes with single quote to allow using unescaped quotes in validation messages
1 parent b4e6ee6 commit f2a852c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

com.reprezen.swagedit.tests/src/com/reprezen/swagedit/tests/ValidationMessageTest.xtend

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ValidationMessageTest {
2222

2323
@Test
2424
def testMessage_additionalItems_notAllowed() {
25-
var expected = "instance type (integer) does not match any allowed primitive type (allowed: [\"array\"])"
25+
var expected = 'instance type (integer) does not match any allowed primitive type (allowed: ["array"])'
2626
// parameters should contain an array of object
2727
val content = '''
2828
swagger: '2.0'
@@ -43,7 +43,7 @@ class ValidationMessageTest {
4343

4444
@Test
4545
def testMessage_typeNoMatch() {
46-
var expected = "instance type (integer) does not match any allowed primitive type (allowed: [\"object\"])"
46+
var expected = 'instance type (integer) does not match any allowed primitive type (allowed: ["object"])'
4747
// responses should contain an object
4848
val content = '''
4949
swagger: '2.0'
@@ -61,7 +61,7 @@ class ValidationMessageTest {
6161

6262
@Test
6363
def testMessage_notInEnum() {
64-
val expected = "instance value (\"foo\") not found in enum (possible values: [\"http\",\"https\",\"ws\",\"wss\"])"
64+
val expected = 'instance value ("foo") not found in enum (possible values: ["http","https","ws","wss"])'
6565
val content = '''
6666
swagger: '2.0'
6767
info:
@@ -83,7 +83,7 @@ class ValidationMessageTest {
8383

8484
@Test
8585
def testMessage_oneOf_fail() {
86-
val expected = "instance failed to match exactly one schema (matched 0 out of 2)"
86+
val expected = 'instance failed to match exactly one schema (matched 0 out of 2)'
8787
val content = '''
8888
swagger: '2.0'
8989
info:
@@ -102,7 +102,7 @@ class ValidationMessageTest {
102102

103103
@Test
104104
def testMessage_additionalProperties_notAllowed() {
105-
val expected = "object instance has properties which are not allowed by the schema: [\"description\"]"
105+
val expected = 'object instance has properties which are not allowed by the schema: ["description"]'
106106
// description should be 2 spaces forward
107107
val content = '''
108108
swagger: '2.0'

0 commit comments

Comments
 (0)