public void NativeCrashUploadAttributesReading_ShouldReadCorrecSessionIdFromPreviousSession_SessionIdIsValid() { var backtraceApi = new BacktraceApiMock(); var attributeProvider = new AttributeProvider(); var backtraceMetrics = new BacktraceMetrics(attributeProvider, 100, "https://unique-event-url.com", "https://summed-event-url.com"); attributeProvider.AddScopedAttributeProvider(backtraceMetrics); // simulate first session new NativeCrashUploader(attributeProvider, backtraceApi); // second session var nativeCrashUploader = new NativeCrashUploader(attributeProvider, backtraceApi); Assert.AreEqual(attributeProvider.ApplicationSessionKey, nativeCrashUploader.SessionId); }
private void StartupMetrics() { AttributeProvider.AddScopedAttributeProvider(Metrics); _metrics.SendStartupEvent(); }