Exemple #1
0
        public void ThenRegistryEntryIncludesPropertyForTraceOptions()
        {
            TypeRegistration registry
                = listenerData.GetRegistrations().Where(tr => tr.Name == "systemDiagnosticsTraceListener\u200Cimplementation").First();

            registry.AssertProperties()
            .WithValueProperty("TraceOutputOptions", TraceOptions.None)
            .WithValueProperty("Name", "systemDiagnosticsTraceListener\u200Cimplementation")
            .VerifyProperties();
        }
        public void ThenRegistrationIncludesInitializationsForTraceOutputOptions()
        {
            TypeRegistration registration =
                listenerData.GetRegistrations().Where(tr => tr.Name == "listener\u200Cimplementation").First();

            registration
            .AssertProperties()
            .WithValueProperty("Name", "listener\u200Cimplementation")
            .WithValueProperty("TraceOutputOptions", listenerData.TraceOutputOptions)
            .VerifyProperties();
        }
        public void ThenRegistryEntryIncludesPropertyForTraceOptions()
        {
            TypeRegistration registry =
                listenerData.GetRegistrations().First(tr => tr.Name == "custom trace listener\u200Cimplementation");

            registry.AssertProperties()
            .WithValueProperty("TraceOutputOptions", TraceOptions.None)
            .WithValueProperty("Name", "custom trace listener\u200Cimplementation")
            .WithContainerResolvedProperty <ILogFormatter>("Formatter", "formatter")
            .VerifyProperties();
        }
Exemple #4
0
        public void ThenRegistryEntryIncludesPropertyForTraceOptionsAndFilter()
        {
            TraceFilter filter;

            registryEntry.AssertProperties()
            .WithValueProperty("TraceOutputOptions", TraceOptions.ProcessId | TraceOptions.Callstack)
            .WithValueProperty("Filter", out filter)
            .WithValueProperty("Name", "systemDiagnosticsTraceListener\u200Cimplementation")
            .VerifyProperties();

            Assert.AreEqual(SourceLevels.Critical, ((EventTypeFilter)filter).EventType);
        }