public void Then_CurrentCategoryIsErrorsAndWarnings() { var loggingConfig = GetLoggingConfiguration(); ILoggingConfigurationSendToExtension internalC = (ILoggingConfigurationSendToExtension)categoryStart; Assert.AreEqual(loggingConfig.SpecialTraceSources.ErrorsTraceSource, internalC.CurrentTraceSource); }
/// <summary> /// Creates a new instance of <see cref="SendToTraceListenerExtension"/>. /// </summary> /// <param name="context">The fluent interface extesion used to configure Trace Listeners. <br/> /// Must implement <see cref="ILoggingConfigurationSendToExtension"/>. /// </param> protected SendToTraceListenerExtension(ILoggingConfigurationSendTo context) { extensionContext = context as ILoggingConfigurationSendToExtension; if (extensionContext == null) throw new ArgumentException( string.Format(CultureInfo.CurrentCulture, Resources.ParameterMustImplementType, typeof(ILoggingConfigurationSendToExtension)), "context"); }
/// <summary> /// Creates a new instance of <see cref="SendToTraceListenerExtension"/>. /// </summary> /// <param name="context">The fluent interface extesion used to configure Trace Listeners. <br/> /// Must implement <see cref="ILoggingConfigurationSendToExtension"/>. /// </param> protected SendToTraceListenerExtension(ILoggingConfigurationSendTo context) { extensionContext = context as ILoggingConfigurationSendToExtension; if (extensionContext == null) { throw new ArgumentException( string.Format(CultureInfo.CurrentCulture, Resources.ParameterMustImplementType, typeof(ILoggingConfigurationSendToExtension)), "context"); } }