Bike.Test.BaseInterpreterTest.ExpectFail C# (CSharp) 메소드

ExpectFail() 보호된 메소드

protected ExpectFail ( string errorType, string source, Func func ) : void
errorType string
source string
func Func
리턴 void
        protected void ExpectFail(string errorType, string source, Func<InterpretationContext> func)
        {
            try
            {
                func();
                Assert.Fail(source);
            }
            catch (BikeObject bo)
            {
                if (!ErrorFactory.IsErrorOfType(bo, errorType))
                {
                    Assert.Fail(source);
                }
            }
        }