-
Notifications
You must be signed in to change notification settings - Fork 495
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0094685
commit 5ab7959
Showing
5 changed files
with
550 additions
and
22 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
236 changes: 236 additions & 0 deletions
236
...ationWithCustomSerializerBaseline.TestMemberInitializerNewtonsoftDataMemberSerializer.xml
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,236 @@ | ||
<Results> | ||
<Result> | ||
<Input> | ||
<Description><![CDATA[Filter w/ constant value, camelcase = True]]></Description> | ||
<Expression><![CDATA[query.Where(doc => (doc.NumericField == 1))]]></Expression> | ||
</Input> | ||
<Output> | ||
<SqlQuery><![CDATA[ | ||
SELECT VALUE root | ||
FROM root | ||
WHERE (root["numberValueNewtonsoft"] = 1)]]></SqlQuery> | ||
<InputData><![CDATA[[ | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-False\", \"Pk\": \"Test\"}" | ||
]]]></InputData> | ||
<Results><![CDATA[[]]]></Results> | ||
</Output> | ||
</Result> | ||
<Result> | ||
<Input> | ||
<Description><![CDATA[Filter w/ DataObject initializer with constant value, camelcase = True]]></Description> | ||
<Expression><![CDATA[query.Where(doc => (doc == new DataObjectNewtonsoftDataMemberSerializer() {NumericField = 1, StringField = "1"}))]]></Expression> | ||
</Input> | ||
<Output> | ||
<SqlQuery><![CDATA[ | ||
SELECT VALUE root | ||
FROM root | ||
WHERE (root = {"numberValueNewtonsoft": 1, "stringValueNewtonsoft": "1", "id": null, "pk": null})]]></SqlQuery> | ||
<InputData><![CDATA[[ | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-False\", \"Pk\": \"Test\"}" | ||
]]]></InputData> | ||
<Results><![CDATA[[]]]></Results> | ||
</Output> | ||
</Result> | ||
<Result> | ||
<Input> | ||
<Description><![CDATA[Select w/ DataObject initializer, camelcase = True]]></Description> | ||
<Expression><![CDATA[query.Select(doc => new DataObjectNewtonsoftDataMemberSerializer() {NumericField = 1, StringField = "1"})]]></Expression> | ||
</Input> | ||
<Output> | ||
<SqlQuery><![CDATA[ | ||
SELECT VALUE {"numberValueNewtonsoft": 1, "stringValueNewtonsoft": "1", "id": null, "pk": null} | ||
FROM root]]></SqlQuery> | ||
<InputData><![CDATA[[ | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-False\", \"Pk\": \"Test\"}" | ||
]]]></InputData> | ||
<Results><![CDATA[[ | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}" | ||
]]]></Results> | ||
</Output> | ||
</Result> | ||
<Result> | ||
<Input> | ||
<Description><![CDATA[Deeper than top level reference, camelcase = True]]></Description> | ||
<Expression><![CDATA[query.Select(doc => IIF((doc.NumericField > 1), new DataObjectNewtonsoftDataMemberSerializer() {NumericField = 1, StringField = "1"}, new DataObjectNewtonsoftDataMemberSerializer() {NumericField = 1, StringField = "1"}))]]></Expression> | ||
</Input> | ||
<Output> | ||
<SqlQuery><![CDATA[ | ||
SELECT VALUE ((root["numberValueNewtonsoft"] > 1) ? {"numberValueNewtonsoft": 1, "stringValueNewtonsoft": "1", "id": null, "pk": null} : {"numberValueNewtonsoft": 1, "stringValueNewtonsoft": "1", "id": null, "pk": null}) | ||
FROM root]]></SqlQuery> | ||
<InputData><![CDATA[[ | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-False\", \"Pk\": \"Test\"}" | ||
]]]></InputData> | ||
<Results><![CDATA[[ | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}" | ||
]]]></Results> | ||
</Output> | ||
</Result> | ||
<Result> | ||
<Input> | ||
<Description><![CDATA[Filter w/ DataObject initializer with member initialization, camelcase = True]]></Description> | ||
<Expression><![CDATA[query.Where(doc => (doc == new DataObjectNewtonsoftDataMemberSerializer() {NumericField = doc.NumericField, StringField = doc.StringField})).Select(b => "A")]]></Expression> | ||
</Input> | ||
<Output> | ||
<SqlQuery><![CDATA[ | ||
SELECT VALUE "A" | ||
FROM root | ||
WHERE (root = {"numberValueNewtonsoft": root["numberValueNewtonsoft"], "stringValueNewtonsoft": root["stringValueNewtonsoft"]})]]></SqlQuery> | ||
<InputData><![CDATA[[ | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-False\", \"Pk\": \"Test\"}" | ||
]]]></InputData> | ||
<Results><![CDATA[[]]]></Results> | ||
</Output> | ||
</Result> | ||
<Result> | ||
<Input> | ||
<Description><![CDATA[Filter w/ constant value, camelcase = False]]></Description> | ||
<Expression><![CDATA[query.Where(doc => (doc.NumericField == 1))]]></Expression> | ||
</Input> | ||
<Output> | ||
<SqlQuery><![CDATA[ | ||
SELECT VALUE root | ||
FROM root | ||
WHERE (root["NumberValueNewtonsoft"] = 1)]]></SqlQuery> | ||
<InputData><![CDATA[[ | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-False\", \"Pk\": \"Test\"}" | ||
]]]></InputData> | ||
<Results><![CDATA[[]]]></Results> | ||
</Output> | ||
</Result> | ||
<Result> | ||
<Input> | ||
<Description><![CDATA[Filter w/ DataObject initializer with constant value, camelcase = False]]></Description> | ||
<Expression><![CDATA[query.Where(doc => (doc == new DataObjectNewtonsoftDataMemberSerializer() {NumericField = 1, StringField = "1"}))]]></Expression> | ||
</Input> | ||
<Output> | ||
<SqlQuery><![CDATA[ | ||
SELECT VALUE root | ||
FROM root | ||
WHERE (root = {"NumberValueNewtonsoft": 1, "StringValueNewtonsoft": "1", "id": null, "Pk": null})]]></SqlQuery> | ||
<InputData><![CDATA[[ | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-False\", \"Pk\": \"Test\"}" | ||
]]]></InputData> | ||
<Results><![CDATA[[]]]></Results> | ||
</Output> | ||
</Result> | ||
<Result> | ||
<Input> | ||
<Description><![CDATA[Select w/ DataObject initializer, camelcase = False]]></Description> | ||
<Expression><![CDATA[query.Select(doc => new DataObjectNewtonsoftDataMemberSerializer() {NumericField = 1, StringField = "1"})]]></Expression> | ||
</Input> | ||
<Output> | ||
<SqlQuery><![CDATA[ | ||
SELECT VALUE {"NumberValueNewtonsoft": 1, "StringValueNewtonsoft": "1", "id": null, "Pk": null} | ||
FROM root]]></SqlQuery> | ||
<InputData><![CDATA[[ | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-False\", \"Pk\": \"Test\"}" | ||
]]]></InputData> | ||
<Results><![CDATA[[ | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}" | ||
]]]></Results> | ||
</Output> | ||
</Result> | ||
<Result> | ||
<Input> | ||
<Description><![CDATA[Deeper than top level reference, camelcase = False]]></Description> | ||
<Expression><![CDATA[query.Select(doc => IIF((doc.NumericField > 1), new DataObjectNewtonsoftDataMemberSerializer() {NumericField = 1, StringField = "1"}, new DataObjectNewtonsoftDataMemberSerializer() {NumericField = 1, StringField = "1"}))]]></Expression> | ||
</Input> | ||
<Output> | ||
<SqlQuery><![CDATA[ | ||
SELECT VALUE ((root["NumberValueNewtonsoft"] > 1) ? {"NumberValueNewtonsoft": 1, "StringValueNewtonsoft": "1", "id": null, "Pk": null} : {"NumberValueNewtonsoft": 1, "StringValueNewtonsoft": "1", "id": null, "Pk": null}) | ||
FROM root]]></SqlQuery> | ||
<InputData><![CDATA[[ | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-False\", \"Pk\": \"Test\"}" | ||
]]]></InputData> | ||
<Results><![CDATA[[ | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}", | ||
"{NumericField:0,StringField:,id:,Pk:}" | ||
]]]></Results> | ||
</Output> | ||
</Result> | ||
<Result> | ||
<Input> | ||
<Description><![CDATA[Filter w/ DataObject initializer with member initialization, camelcase = False]]></Description> | ||
<Expression><![CDATA[query.Where(doc => (doc == new DataObjectNewtonsoftDataMemberSerializer() {NumericField = doc.NumericField, StringField = doc.StringField})).Select(b => "A")]]></Expression> | ||
</Input> | ||
<Output> | ||
<SqlQuery><![CDATA[ | ||
SELECT VALUE "A" | ||
FROM root | ||
WHERE (root = {"NumberValueNewtonsoft": root["NumberValueNewtonsoft"], "StringValueNewtonsoft": root["StringValueNewtonsoft"]})]]></SqlQuery> | ||
<InputData><![CDATA[[ | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-True\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 0, \"StringField\": \"0\", \"id\": \"0-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 1, \"StringField\": \"1\", \"id\": \"1-False\", \"Pk\": \"Test\"}", | ||
"{\"NumericField\": 2, \"StringField\": \"2\", \"id\": \"2-False\", \"Pk\": \"Test\"}" | ||
]]]></InputData> | ||
<Results><![CDATA[[]]]></Results> | ||
</Output> | ||
</Result> | ||
</Results> |
Oops, something went wrong.