public void IsFalse_IsTrue_ThrowsException() { var exception = Assert.Throws <ArgumentException>(() => { DebugGuard.IsFalse(true, "myParamName", "myTestMessage"); }); Assert.Equal("myParamName", exception.ParamName); Assert.True(exception.Message.Contains("myTestMessage")); }
/// <summary> /// Marks current converter state as 'converted'. /// </summary> /// <remarks> /// This must be called only for baseline interleaved jpeg's. /// </remarks> public void CommitConversion() { DebugGuard.IsFalse(this.Converted, nameof(this.Converted), $"{nameof(this.CommitConversion)} must be called only once"); this.Converted = true; }
public void IsFalse_IsFalse_ThrowsNoException() { DebugGuard.IsFalse(false, "myParamName", "myTestMessage"); }