public void T002_SetTraceEnabledForAll() { var sut = new TracedDisposableControl(); Assert.False(sut.IsTraceEnabled(null)); Assert.False(sut.IsTraceEnabled(typeof(int))); }
public void T004_SetTraceEnabledForType_Null() { var sut = new TracedDisposableControl(); sut.SetTraceEnabledForAll(false); Assert.False(sut.IsTraceEnabled(null)); sut.SetTraceEnabledForAll(true); Assert.True(sut.IsTraceEnabled(null)); }
public void T001_GetStackTrace() { /* * TracedDisposableControlTest.T001_GetStackTrace fileName:G:\github\grimmborium\Brimborium.Extensions\test\Brimborium.Extensions.Abstractions.Test\TracedDisposableControlTest.cs@12:13 */ var st = TracedDisposableControl.GetStackTrace(); Assert.StartsWith("TracedDisposableControlTest.T001_GetStackTrace fileName:", st); Assert.Contains(@"Brimborium.Extensions.Abstractions.Test\TracedDisposableControlTest.cs@13:13", st); }
public void T005_SetTraceEnabledForType() { var sut = new TracedDisposableControl(); sut.SetTraceEnabledForType(typeof(IDisposable), true); Assert.True(sut.IsTraceEnabled(typeof(IDisposable))); Assert.False(sut.IsTraceEnabled(typeof(int))); sut.SetTraceEnabledForType(typeof(string), true); Assert.True(sut.IsTraceEnabled(typeof(IDisposable))); Assert.True(sut.IsTraceEnabled(typeof(string))); Assert.False(sut.IsTraceEnabled(typeof(int))); }