public void GetEventData_ConvertEnum()
        {
            var e = new InformationEvent("test", InformationLevel.Debug);

            var level   = e.GetData <InformationLevel>(MetadataKeys.Event.Information.Level);
            var message = e.GetData <string>(MetadataKeys.Event.Information.Message);

            Assert.IsNotNull(message);
            Assert.AreSame("test", message);
            Assert.AreEqual(InformationLevel.Debug, level);
        }
Exemple #2
0
        public void GetEventData_ConvertEnum()
        {
            var e = new InformationEvent("test", InformationLevel.Debug);

            var level = e.GetData<InformationLevel>(MetadataKeys.Event.Information.Level);
            var message = e.GetData<string>(MetadataKeys.Event.Information.Message);

            Assert.IsNotNull(message);
            Assert.AreSame("test", message);
            Assert.AreEqual(InformationLevel.Debug, level);
        }