예제 #1
0
        public void EnvironmentInfo_IncorrectEventType(string eventType)
        {
            var client  = new ExceptionlessClient();
            var context = new EventEnrichmentContext(client);
            var ev      = new Event {
                Type = eventType
            };

            var enrichment = new EnvironmentInfo();

            enrichment.Enrich(context, ev);
            Assert.Equal(0, ev.Data.Count);
        }
예제 #2
0
        public void EnvironmentInfo_ShouldAddSessionStart()
        {
            var client  = new ExceptionlessClient();
            var context = new EventEnrichmentContext(client);
            var ev      = new Event {
                Type = Event.KnownTypes.SessionStart
            };

            var enrichment = new EnvironmentInfo();

            enrichment.Enrich(context, ev);
            Assert.Equal(1, ev.Data.Count);
            Assert.NotNull(ev.Data[Event.KnownDataKeys.EnvironmentInfo]);
        }