public void TelemetryTestService_SimpleEventTest() { var area = "Options"; var eventName = "event"; TelemetryTestService telemetryService = new TelemetryTestService(); telemetryService.ReportEvent(area, eventName); string log = telemetryService.SessionLog; Assert.AreEqual(TelemetryTestService.EventNamePrefixString + area.ToString() + "/" + eventName + "\r\n", log); }
public void TelemetryTestService_EventWithParametersTest() { var area = "Options"; var eventName = "event"; TelemetryTestService telemetryService = new TelemetryTestService(); telemetryService.ReportEvent(area, eventName, new { parameter = "value" }); string log = telemetryService.SessionLog; Assert.AreEqual(TelemetryTestService.EventNamePrefixString + area.ToString() + "/" + eventName + "\r\n\t" + TelemetryTestService.PropertyNamePrefixString + area.ToString() + ".parameter : value\r\n", log); }