public void WrapperTargetDefaultWriteTest() { Exception lastException = null; var wrapper = new MyWrapper(); wrapper.WrappedTarget = new MyWrappedTarget(); ((ISupportsInitialize)wrapper).Initialize(); wrapper.WriteLogEvent(LogEventInfo.CreateNullEvent(), ex => lastException = ex); Assert.IsNotNull(lastException); Assert.IsInstanceOfType(lastException, typeof(NotSupportedException)); }