Exemple #1
0
        public void WhenCreatesRegistrations_ThenCallHandlerRegistrationInjectsProperties()
        {
            List <string> categories;

            var registrations = callHandlerData.GetRegistrations("-suffix");

            registrations.ElementAt(0)
            .AssertProperties()
            .WithValueProperty("Order", 400)
            .WithValueProperty("LogBeforeCall", false)
            .WithValueProperty("LogAfterCall", true)
            .WithValueProperty("BeforeMessage", "before")
            .WithValueProperty("AfterMessage", "after")
            .WithValueProperty("EventId", 1000)
            .WithValueProperty("IncludeCallStack", true)
            .WithValueProperty("IncludeCallTime", false)
            .WithValueProperty("IncludeParameters", true)
            .WithValueProperty("Priority", 500)
            .WithValueProperty("Severity", TraceEventType.Warning)
            .WithValueProperty("Categories", out categories)
            .VerifyProperties();

            CollectionAssert.AreEqual(
                new[] { "cat1", "cat2", "cat3" },
                categories);
        }
        public void WhenCreatesTypeRegistration_ThenCreatesSingleRegistration()
        {
            var registrations = callHandlerData.GetRegistrations("-suffix");

            Assert.AreEqual(1, registrations.Count());
        }