Skip to content

Commit 6b1a5c5

Browse files
committed
Updated test fixtures. Removed temporary comments.
1 parent b24089e commit 6b1a5c5

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

test/Microsoft.Health.Fhir.Shared.Tests.E2E/Rest/Import/ImportDateSearchTestFixture.cs

+9-2
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,21 @@ protected override async Task OnInitializedAsync()
3333
p => SetObservation(p, "1980-05-11"), // 1980-05-11T00:00:00.0000000 <-> 1980-05-11T23:59:59.9999999
3434
p => SetObservation(p, "1980-05-11T16:32:15"), // 1980-05-11T16:32:15.0000000 <-> 1980-05-11T16:32:15.9999999
3535
p => SetObservation(p, "1980-05-11T16:32:15.500"), // 1980-05-11T16:32:15.5000000 <-> 1980-05-11T16:32:15.5000000
36-
p => SetObservation(p, "1981-01-01")); // 1981-01-01T00:00:00.0000000 <-> 1981-12-31T23:59:59.9999999
37-
36+
p => SetObservation(p, "1981-01-01"), // 1981-01-01T00:00:00.0000000 <-> 1981-12-31T23:59:59.9999999
37+
p => SetObservationWithPeriod(p, "1980-05-16", "1980-05-17")); // 1980-05-11T00:00:00.0000000 <-> 1980-05-12T23:59:59.9999999
3838
void SetObservation(Observation observation, string date)
3939
{
4040
observation.Status = ObservationStatus.Final;
4141
observation.AddTestTag(FixtureTag);
4242
observation.Effective = new FhirDateTime(date);
4343
}
44+
45+
void SetObservationWithPeriod(Observation observation, string startDate, string endDate)
46+
{
47+
observation.Status = ObservationStatus.Final;
48+
observation.AddTestTag(FixtureTag);
49+
observation.Effective = new Period(new FhirDateTime(startDate), new FhirDateTime(endDate));
50+
}
4451
}
4552
}
4653
}

test/Microsoft.Health.Fhir.Shared.Tests.E2E/Rest/Search/DateSearchTestFixture.cs

+9-11
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,14 @@ protected override async Task OnInitializedAsync()
3333
};
3434

3535
Observations = await TestFhirClient.CreateResourcesAsync<Observation>(
36-
p => SetObservationWithPeriod(p, "1980-05-16", "1980-05-17")); // 1980-05-11T00:00:00.0000000 <-> 1980-05-12T23:59:59.9999999
37-
38-
// p => SetObservation(p, "1979-12-31"), // 1979-12-31T00:00:00.0000000 <-> 1979-12-31T23:59:59.9999999
39-
// p => SetObservation(p, "1980"), // 1980-01-01T00:00:00.0000000 <-> 1980-12-31T23:59:59.9999999
40-
// p => SetObservation(p, "1980-05"), // 1980-05-01T00:00:00.0000000 <-> 1980-05-31T23:59:59.9999999
41-
// p => SetObservation(p, "1980-05-11"), // 1980-05-11T00:00:00.0000000 <-> 1980-05-11T23:59:59.9999999
42-
// p => SetObservation(p, "1980-05-11T16:32:15"), // 1980-05-11T16:32:15.0000000 <-> 1980-05-11T16:32:15.9999999
43-
// p => SetObservation(p, "1980-05-11T16:32:15.500"), // 1980-05-11T16:32:15.5000000 <-> 1980-05-11T16:32:15.5000000
44-
// p => SetObservation(p, "1981-01-01"), // 1981-01-01T00:00:00.0000000 <-> 1981-12-31T23:59:59.9999999
45-
/*
36+
p => SetObservation(p, "1979-12-31"), // 1979-12-31T00:00:00.0000000 <-> 1979-12-31T23:59:59.9999999
37+
p => SetObservation(p, "1980"), // 1980-01-01T00:00:00.0000000 <-> 1980-12-31T23:59:59.9999999
38+
p => SetObservation(p, "1980-05"), // 1980-05-01T00:00:00.0000000 <-> 1980-05-31T23:59:59.9999999
39+
p => SetObservation(p, "1980-05-11"), // 1980-05-11T00:00:00.0000000 <-> 1980-05-11T23:59:59.9999999
40+
p => SetObservation(p, "1980-05-11T16:32:15"), // 1980-05-11T16:32:15.0000000 <-> 1980-05-11T16:32:15.9999999
41+
p => SetObservation(p, "1980-05-11T16:32:15.500"), // 1980-05-11T16:32:15.5000000 <-> 1980-05-11T16:32:15.5000000
42+
p => SetObservation(p, "1981-01-01"), // 1981-01-01T00:00:00.0000000 <-> 1981-12-31T23:59:59.9999999
43+
p => SetObservationWithPeriod(p, "1980-05-16", "1980-05-17")); // 1980-05-11T00:00:00.0000000 <-> 1980-05-12T23:59:59.9999999
4644
void SetObservation(Observation observation, string date)
4745
{
4846
observation.Status = ObservationStatus.Final;
@@ -54,7 +52,7 @@ void SetObservation(Observation observation, string date)
5452
},
5553
};
5654
observation.Effective = new FhirDateTime(date);
57-
}*/
55+
}
5856

5957
void SetObservationWithPeriod(Observation observation, string startDate, string endDate)
6058
{

0 commit comments

Comments
 (0)