public void ClassConvertToThrowExceptionIfDisposed() { var format = new StringFormatTest("3"); format.Dispose(); Assert.Throws <ObjectDisposedException>(() => format.ConvertTo(typeof(int))); }
public void ClassConvertToGenericThrowExceptionIfDisposed() { var format = new StringFormatTest("3"); format.Dispose(); Assert.Throws <ObjectDisposedException>(() => format.ConvertTo <int>()); }
public void DisposeChangesDisposed() { var format = new StringFormatTest("3"); Assert.IsFalse(format.Disposed); format.Dispose(); Assert.IsTrue(format.Disposed); }
public void ClassConvertWithThrowsExceptionIfDisposed() { var format = new StringFormatTest("3"); var converter = new FormatTestDuplicatedConverter2(); format.Dispose(); Assert.Throws <ObjectDisposedException>(() => format.ConvertWith <short>(converter)); }