void AssertMetricRecorded(DeveloperEventType.Types.Type type, DeveloperEventStatus.Types.Code status) { _metrics.Received().RecordEvent( type, Arg.Is <DeveloperLogEvent>(p => p.StatusCode == status && p.DebugSessionIdStr == _testDebugSessionId)); }
public void RecordEvent(DeveloperEventType.Types.Type type, DeveloperLogEvent proto) { if (DebugSessionId != null) { proto = proto.Clone(); proto.DebugSessionIdStr = DebugSessionId; } metricsService.RecordEvent(type, proto); }
// Create a valid action of the given type. This is an internal constructor used by // ActionRecorder. It is public for use in tests only, where ActionRecorder is not // the right dependency to inject. public Action(DeveloperEventType.Types.Type eventType, Timer.Factory timerFactory, IMetrics metrics) { this.eventType = eventType; logEvent = new DeveloperLogEvent { StatusCode = DeveloperEventStatus.Types.Code.Success }; this.timerFactory = timerFactory; this.metrics = metrics; }
public void RecordEvent(DeveloperEventType.Types.Type type, DeveloperLogEvent partialProto) { }