public void EnvironmentInfo_IncorrectEventType(string eventType) {
            var client = new ExceptionlessClient();
            var context = new EventPluginContext(client, new Event { Type = eventType });

            var plugin = new EnvironmentInfoPlugin();
            plugin.Run(context);
            Assert.Equal(0, context.Event.Data.Count);
        }
 public void EnvironmentInfo_ShouldAddSessionStart() {
     var client = new ExceptionlessClient();
     var context = new EventPluginContext(client, new Event { Type = Event.KnownTypes.SessionStart });
  
     var plugin = new EnvironmentInfoPlugin();
     plugin.Run(context);
     Assert.Equal(1, context.Event.Data.Count);
     Assert.NotNull(context.Event.Data[Event.KnownDataKeys.EnvironmentInfo]);
 }
        public void EnvironmentInfo_CanRunInParallel() {
            var client = new ExceptionlessClient();
            var ev = new Event { Type = Event.KnownTypes.SessionStart };
            var plugin = new EnvironmentInfoPlugin();

            Parallel.For(0, 10000, i => {
                var context = new EventPluginContext(client, ev);
                plugin.Run(context);
                Assert.Equal(1, context.Event.Data.Count);
                Assert.NotNull(context.Event.Data[Event.KnownDataKeys.EnvironmentInfo]);
            });
        }