private void RecordEval(EventProcessor ep, TestFlagProperties f, TestEvalProperties e)
 {
     ep.RecordEvaluationEvent(new EvaluationEvent
     {
         Timestamp            = e.Timestamp,
         User                 = e.User,
         FlagKey              = f.Key,
         FlagVersion          = f.Version,
         Variation            = e.Variation,
         Value                = e.Value,
         Default              = e.DefaultValue,
         Reason               = e.Reason,
         PrereqOf             = e.PrereqOf,
         TrackEvents          = f.TrackEvents,
         DebugEventsUntilDate = f.DebugEventsUntilDate
     });
 }
 private void CheckFeatureOrDebugEvent(string kind, LdValue t, TestFlagProperties f, TestEvalProperties e,
                                       LdValue userJson)
 {
     Assert.Equal(LdValue.Of(kind), t.Get("kind"));
     Assert.Equal(LdValue.Of(e.Timestamp.Value), t.Get("creationDate"));
     Assert.Equal(LdValue.Of(f.Key), t.Get("key"));
     Assert.Equal(LdValue.Of(f.Version), t.Get("version"));
     Assert.Equal(e.Variation.HasValue ? LdValue.Of(e.Variation.Value) : LdValue.Null, t.Get("variation"));
     Assert.Equal(e.Value, t.Get("value"));
     CheckEventUserOrKey(t, e.User, userJson);
     Assert.Equal(e.Reason.HasValue ?
                  LdValue.Parse(LdJsonSerialization.SerializeObject(e.Reason.Value)) : LdValue.Null,
                  t.Get("reason"));
 }
 private void CheckDebugEvent(LdValue t, TestFlagProperties f, TestEvalProperties e,
                              LdValue userJson)
 {
     CheckFeatureOrDebugEvent("debug", t, f, e, userJson);
 }