|
| 1 | +using System; |
1 | 2 | using System.Collections.Generic; |
2 | 3 | using OpenFeature.Model; |
3 | 4 | using OpenFeature.Tests.Internal; |
@@ -31,15 +32,19 @@ public void TrackingEventDetails_HasAValueProperty() |
31 | 32 | public void TrackingEventDetails_CanTakeValues() |
32 | 33 | { |
33 | 34 | var structure = new Structure(new Dictionary<string, Value> { { "key", new Value("value") } }); |
34 | | - var builder = new TrackingEventDetailsBuilder() |
| 35 | + var dateTimeValue = new Value(DateTime.Now); |
| 36 | + var builder = TrackingEventDetails.Builder() |
35 | 37 | .Set("boolean", true) |
36 | 38 | .Set("string", "some string") |
37 | | - .Set("number", 123.3) |
38 | | - .Set("structure", structure); |
| 39 | + .Set("double", 123.3) |
| 40 | + .Set("structure", structure) |
| 41 | + .Set("value", dateTimeValue); |
39 | 42 | var details = builder.Build(); |
| 43 | + Assert.Equal(5, details.Count); |
40 | 44 | Assert.Equal(true, details.GetValue("boolean").AsBoolean); |
41 | 45 | Assert.Equal("some string", details.GetValue("string").AsString); |
42 | | - Assert.Equal(123.3, details.GetValue("number").AsDouble); |
| 46 | + Assert.Equal(123.3, details.GetValue("double").AsDouble); |
43 | 47 | Assert.Equal(structure, details.GetValue("structure").AsStructure); |
| 48 | + Assert.Equal(dateTimeValue, details.GetValue("value")); |
44 | 49 | } |
45 | 50 | } |
0 commit comments