Example #1
0
        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"));
        }
Example #2
0
        /// <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;
        }
Example #3
0
 public void IsFalse_IsFalse_ThrowsNoException()
 {
     DebugGuard.IsFalse(false, "myParamName", "myTestMessage");
 }