CK.Text.Tests.StringMatcherTests.CheckMatchError C# (CSharp) Method

CheckMatchError() private static method

private static CheckMatchError ( StringMatcher m, Func fail ) : void
m StringMatcher
fail Func
return void
        private static void CheckMatchError( StringMatcher m, Func<bool> fail )
        {
            int idx = m.StartIndex;
            int len = m.Length;
            Assert.That( fail(), Is.False );
            Assert.That( m.IsError );
            Assert.That( m.ErrorMessage, Is.Not.Null.Or.Empty );
            Assert.That( m.StartIndex == idx, "Head must not move on error." );
            Assert.That( m.Length == len, "Length must not change on error." );
            m.SetSuccess();
        }