forked from finos/legend-engine
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support comma in column value for service test csv data (finos#1899)
- Loading branch information
1 parent
9c18f50
commit f0c587d
Showing
6 changed files
with
156 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
.../test/resources/testable/relational/legend-testable-relational-service-csv-test-data.pure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
###Service | ||
Service service::RelationalServiceWithCSV | ||
{ | ||
pattern: '/myService/{firm}'; | ||
documentation: ''; | ||
autoActivateUpdates: true; | ||
execution: Single | ||
{ | ||
query: |model::Person.all()->project([x|$x.firstName, x|$x.lastName], ['First Name', 'Last Name']); | ||
mapping: execution::RelationalMapping; | ||
runtime: execution::Runtime; | ||
} | ||
testSuites: | ||
[ | ||
testSuite_1: | ||
{ | ||
data: | ||
[ | ||
connections: | ||
[ | ||
connection_1: | ||
Relational | ||
#{ | ||
default.PersonTable: | ||
'id,firm_id,firstName,lastName,employeeType\n'+ | ||
'1,1,I\'m John, "Doe, Jr",FTO\n'+ | ||
'2,1,Nicole,Smith,FTC\n'+ | ||
'3,2,Time,Smith,FTE\n'; | ||
}# | ||
] | ||
] | ||
tests: | ||
[ | ||
test_1: | ||
{ | ||
serializationFormat: PURE_TDSOBJECT; | ||
asserts: | ||
[ | ||
assertion_1: | ||
EqualToJson | ||
#{ | ||
expected: | ||
ExternalFormat | ||
#{ | ||
contentType: 'application/json'; | ||
data: '[ {\n "First Name" : "I\'m John",\n "Last Name" : "\\"Doe, Jr\\""\n}, {\n "First Name" : "Nicole",\n "Last Name" : "Smith"\n}, {\n "First Name" : "Time",\n "Last Name" : "Smith"\n} ]'; | ||
}#; | ||
}# | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters