From 2c1e1fb9837d8c47fbbc6f4bb4f571a8c18540d0 Mon Sep 17 00:00:00 2001 From: evanchooly Date: Mon, 18 Nov 2024 21:29:38 -0500 Subject: [PATCH] add test files --- .../aggregation/stages/lookup/example7/action.json | 7 +++++++ .../test/aggregation/stages/lookup/example7/data.json | 3 +++ .../test/aggregation/stages/lookup/example7/data1.json | 6 ++++++ .../test/aggregation/stages/lookup/example7/name | 1 + .../aggregation/stages/unionWith/example4/action.json | 5 +++++ .../aggregation/stages/unionWith/example4/data.json | 6 ++++++ .../aggregation/stages/unionWith/example4/data1.json | 9 +++++++++ .../aggregation/stages/unionWith/example4/data2.json | 10 ++++++++++ .../aggregation/stages/unionWith/example4/data3.json | 10 ++++++++++ .../test/aggregation/stages/unionWith/example4/name | 1 + 10 files changed, 58 insertions(+) create mode 100644 core/src/test/resources/dev/morphia/test/aggregation/stages/lookup/example7/action.json create mode 100644 core/src/test/resources/dev/morphia/test/aggregation/stages/lookup/example7/data.json create mode 100644 core/src/test/resources/dev/morphia/test/aggregation/stages/lookup/example7/data1.json create mode 100644 core/src/test/resources/dev/morphia/test/aggregation/stages/lookup/example7/name create mode 100644 core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/action.json create mode 100644 core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/data.json create mode 100644 core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/data1.json create mode 100644 core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/data2.json create mode 100644 core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/data3.json create mode 100644 core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/name diff --git a/core/src/test/resources/dev/morphia/test/aggregation/stages/lookup/example7/action.json b/core/src/test/resources/dev/morphia/test/aggregation/stages/lookup/example7/action.json new file mode 100644 index 00000000000..2af94fd6c2f --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/aggregation/stages/lookup/example7/action.json @@ -0,0 +1,7 @@ +{ + $lookup: { + from: "cakeFlavors", + pipeline: [ { $documents: [ {} ] } ], + as: "test" + } +} \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/stages/lookup/example7/data.json b/core/src/test/resources/dev/morphia/test/aggregation/stages/lookup/example7/data.json new file mode 100644 index 00000000000..4dac13b74aa --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/aggregation/stages/lookup/example7/data.json @@ -0,0 +1,3 @@ +{ "_id" : 1, "item" : "almonds", "price" : 12, "quantity" : 2 }, +{ "_id" : 2, "item" : "pecans", "price" : 20, "quantity" : 1 }, +{ "_id" : 3 } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/stages/lookup/example7/data1.json b/core/src/test/resources/dev/morphia/test/aggregation/stages/lookup/example7/data1.json new file mode 100644 index 00000000000..079a9e04d3d --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/aggregation/stages/lookup/example7/data1.json @@ -0,0 +1,6 @@ +{ "_id" : 1, "sku" : "almonds", "description": "product 1", "instock" : 120 }, +{ "_id" : 2, "sku" : "bread", "description": "product 2", "instock" : 80 }, +{ "_id" : 3, "sku" : "cashews", "description": "product 3", "instock" : 60 }, +{ "_id" : 4, "sku" : "pecans", "description": "product 4", "instock" : 70 }, +{ "_id" : 5, "sku": null, "description": "Incomplete" }, +{ "_id" : 6 } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/stages/lookup/example7/name b/core/src/test/resources/dev/morphia/test/aggregation/stages/lookup/example7/name new file mode 100644 index 00000000000..2c7a199d79a --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/aggregation/stages/lookup/example7/name @@ -0,0 +1 @@ +Namespaces in Subpipelines \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/action.json b/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/action.json new file mode 100644 index 00000000000..f520a9970c3 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/action.json @@ -0,0 +1,5 @@ +{ + $unionWith: { + coll: "cakeFlavors", + pipeline: [ { $documents: [] } ] } +} \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/data.json b/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/data.json new file mode 100644 index 00000000000..3899bf401b5 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/data.json @@ -0,0 +1,6 @@ +{ store: "General Store", item: "Chocolates", quantity: 150 }, +{ store: "ShopMart", item: "Chocolates", quantity: 50 }, +{ store: "General Store", item: "Cookies", quantity: 100 }, +{ store: "ShopMart", item: "Cookies", quantity: 120 }, +{ store: "General Store", item: "Pie", quantity: 10 }, +{ store: "ShopMart", item: "Pie", quantity: 5 } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/data1.json b/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/data1.json new file mode 100644 index 00000000000..95141c0e4e3 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/data1.json @@ -0,0 +1,9 @@ +{ store: "General Store", item: "Cheese", quantity: 30 }, +{ store: "ShopMart", item: "Cheese", quantity: 50 }, +{ store: "General Store", item: "Chocolates", quantity: 125 }, +{ store: "ShopMart", item: "Chocolates", quantity: 150 }, +{ store: "General Store", item: "Cookies", quantity: 200 }, +{ store: "ShopMart", item: "Cookies", quantity: 100 }, +{ store: "ShopMart", item: "Nuts", quantity: 100 }, +{ store: "General Store", item: "Pie", quantity: 30 }, +{ store: "ShopMart", item: "Pie", quantity: 25 } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/data2.json b/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/data2.json new file mode 100644 index 00000000000..1a9bb44908e --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/data2.json @@ -0,0 +1,10 @@ +{ store: "General Store", item: "Cheese", quantity: 50 }, +{ store: "ShopMart", item: "Cheese", quantity: 20 }, +{ store: "General Store", item: "Chocolates", quantity: 125 }, +{ store: "ShopMart", item: "Chocolates", quantity: 150 }, +{ store: "General Store", item: "Cookies", quantity: 200 }, +{ store: "ShopMart", item: "Cookies", quantity: 100 }, +{ store: "General Store", item: "Nuts", quantity: 80 }, +{ store: "ShopMart", item: "Nuts", quantity: 30 }, +{ store: "General Store", item: "Pie", quantity: 50 }, +{ store: "ShopMart", item: "Pie", quantity: 75 } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/data3.json b/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/data3.json new file mode 100644 index 00000000000..90785581ce3 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/data3.json @@ -0,0 +1,10 @@ +{ store: "General Store", item: "Cheese", quantity: 100, }, +{ store: "ShopMart", item: "Cheese", quantity: 100}, +{ store: "General Store", item: "Chocolates", quantity: 200 }, +{ store: "ShopMart", item: "Chocolates", quantity: 300 }, +{ store: "General Store", item: "Cookies", quantity: 500 }, +{ store: "ShopMart", item: "Cookies", quantity: 400 }, +{ store: "General Store", item: "Nuts", quantity: 100 }, +{ store: "ShopMart", item: "Nuts", quantity: 200 }, +{ store: "General Store", item: "Pie", quantity: 100 }, +{ store: "ShopMart", item: "Pie", quantity: 100 } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/name b/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/name new file mode 100644 index 00000000000..2c7a199d79a --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/aggregation/stages/unionWith/example4/name @@ -0,0 +1 @@ +Namespaces in Subpipelines \ No newline at end of file