From a56859d64bf4eebe6e283ffa7d39a0801f611594 Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Sun, 5 Feb 2023 10:56:00 +0100 Subject: [PATCH] Extend import test files --- test/import/ok-without-accounts.json | 48 ++++++++++++++++++++++++++++ test/import/ok.json | 21 +++++++++++- 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 test/import/ok-without-accounts.json diff --git a/test/import/ok-without-accounts.json b/test/import/ok-without-accounts.json new file mode 100644 index 000000000..63961be74 --- /dev/null +++ b/test/import/ok-without-accounts.json @@ -0,0 +1,48 @@ +{ + "meta": { + "date": "2022-04-01T00:00:00.000Z", + "version": "dev" + }, + "activities": [ + { + "fee": 0, + "quantity": 0, + "type": "BUY", + "unitPrice": 0, + "currency": "USD", + "dataSource": "YAHOO", + "date": "2050-06-05T22:00:00.000Z", + "symbol": "MSFT" + }, + { + "fee": 0, + "quantity": 1, + "type": "ITEM", + "unitPrice": 500000, + "currency": "USD", + "dataSource": "MANUAL", + "date": "2021-12-31T22:00:00.000Z", + "symbol": "Penthouse Apartment" + }, + { + "fee": 0, + "quantity": 5, + "type": "DIVIDEND", + "unitPrice": 0.62, + "currency": "USD", + "dataSource": "YAHOO", + "date": "2021-11-16T22:00:00.000Z", + "symbol": "MSFT" + }, + { + "fee": 19, + "quantity": 5, + "type": "BUY", + "unitPrice": 298.58, + "currency": "USD", + "dataSource": "YAHOO", + "date": "2021-09-15T22:00:00.000Z", + "symbol": "MSFT" + } + ] +} diff --git a/test/import/ok.json b/test/import/ok.json index 63961be74..335d2cd8a 100644 --- a/test/import/ok.json +++ b/test/import/ok.json @@ -1,10 +1,23 @@ { "meta": { - "date": "2022-04-01T00:00:00.000Z", + "date": "2023-02-05T00:00:00.000Z", "version": "dev" }, + "accounts": [ + { + "accountType": "SECURITIES", + "balance": 2000, + "currency": "USD", + "id": "b2d3fe1d-d6a8-41a3-be39-07ef5e9480f0", + "isExcluded": false, + "name": "My Online Trading Account", + "platformId": null + } + ], "activities": [ { + "accountId": "b2d3fe1d-d6a8-41a3-be39-07ef5e9480f0", + "comment": null, "fee": 0, "quantity": 0, "type": "BUY", @@ -15,6 +28,8 @@ "symbol": "MSFT" }, { + "accountId": null, + "comment": null, "fee": 0, "quantity": 1, "type": "ITEM", @@ -25,6 +40,8 @@ "symbol": "Penthouse Apartment" }, { + "accountId": "b2d3fe1d-d6a8-41a3-be39-07ef5e9480f0", + "comment": null, "fee": 0, "quantity": 5, "type": "DIVIDEND", @@ -35,6 +52,8 @@ "symbol": "MSFT" }, { + "accountId": "b2d3fe1d-d6a8-41a3-be39-07ef5e9480f0", + "comment": "My first order", "fee": 19, "quantity": 5, "type": "BUY",