Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Fixed unit test #1052

Merged
1 commit merged into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"idempotency_key": "E09585E4-A6A9-4E4A-84C3-0FB8B23B2498",
"idempotencyKey": "E09585E4-A6A9-4E4A-84C3-0FB8B23B2498",
"platform": "Android",
"appPackageName": "jp.go.mhlw.covid19radar",
"deviceVerificationPayload": "dummy value",
"event_logs": [
"eventLogs": [
{
"has_consent": true,
"hasConsent": true,
"epoch": 1640256881,
"type": "ExposureNotification",
"subtype": "ExposureData",
"content": "Lorem ipsum dolor sit amet, consectetur adipisci elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrum exercitationem ullam"
},
{
"has_consent": true,
"hasConsent": true,
"epoch": 1640257311,
"type": "ExposureNotification",
"subtype": "ExposureData",
"content": "Aenean sit amet dui blandit, faucibus neque sollicitudin, sollicitudin nisi. Vivamus mattis felis vitae lorem ultrices interdum. Nam massa orci, hendrerit in mauris at, ultricies eleifend tortor. Etiam neque dolor, tincidunt a scelerisque id, commodo at purus. Mauris ac ultrices quam. Aliquam elementum diam venenatis orci tempor finibus. Donec ultricies interdum tortor, vitae imperdiet orci porta ac."
},
{
"has_consent": true,
"hasConsent": true,
"epoch": 1640258212,
"type": "ExposureNotification",
"subtype": "ExposureData",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,15 @@ public async Task PutEventLogTests_Success()
var jsonContent = JsonConvert.DeserializeObject(stringContent) as JObject;
Assert.NotNull(jsonContent);

Assert.Equal("05A6A158-E216-4599-B99E-3708D360FF2F", jsonContent["idempotency_key"].Value<string>());
Assert.Equal("05A6A158-E216-4599-B99E-3708D360FF2F", jsonContent["idempotencyKey"].Value<string>());
Assert.Equal("platform", jsonContent["platform"].Value<string>());
Assert.Equal("app-package-name", jsonContent["appPackageName"].Value<string>());
Assert.Equal("device-verification-payload", jsonContent["deviceVerificationPayload"].Value<string>());

var eventLogs = jsonContent["event_logs"] as JArray;
var eventLogs = jsonContent["eventLogs"] as JArray;
Assert.Single(eventLogs);

Assert.True(eventLogs[0]["has_consent"].Value<bool>());
Assert.True(eventLogs[0]["hasConsent"].Value<bool>());
Assert.Equal(1000, eventLogs[0]["epoch"].Value<long>());
Assert.Equal("type", eventLogs[0]["type"].Value<string>());
Assert.Equal("subtype", eventLogs[0]["subtype"].Value<string>());
Expand Down