Ejemplo n.º 1
0
        public void BuildDetails(TimerResult timerResult, bool isChildAction, Type executedType, MethodInfo method, string eventName, TimelineCategory eventCategory)
        {
            var message = new ActionBaseMessage(timerResult, isChildAction, executedType, method, eventName, eventCategory);

            var dictionary = new Dictionary<string, object>();
            message.BuildDetails(dictionary);

            Assert.Equal(3, dictionary.Count); 
            Assert.Equal(isChildAction, dictionary["IsChildAction"]);
            Assert.Equal(method.Name, dictionary["ExecutionMethod"]); 
            Assert.Equal(executedType, dictionary["ExecutedType"]);
        }
Ejemplo n.º 2
0
        public void Construct(TimerResult timerResult, bool isChildAction, Type executedType, MethodInfo method, string eventName, TimelineCategory eventCategory)
        {
            var message = new ActionBaseMessage(timerResult, isChildAction, executedType, method, eventName, eventCategory);

            Assert.Equal(timerResult.Duration, message.Duration);
            Assert.Equal(timerResult.Offset, message.Offset);
            Assert.Equal(timerResult.StartTime, message.StartTime);
            Assert.Equal(eventName, message.EventName);
            Assert.Equal(eventCategory, message.EventCategory);
            Assert.Equal(eventCategory, message.EventCategory);
            Assert.Equal(executedType, message.ExecutedType);
            Assert.Equal(method, message.ExecutedMethod); 
        }