예제 #1
0
        public static void That(Expression <Func <bool> > assertion)
        {
            var exception = AssertImpl.That(assertion, null, null);

            if (exception != null)
            {
                throw exception;
            }
        }
예제 #2
0
        public static async Task Throws <TException>(Expression <Func <Task> > expression) where TException : Exception
        {
            var exception = await AssertImpl.Throws(expression, typeof(TException));

            if (exception != null)
            {
                throw exception;
            }
        }
예제 #3
0
        public static async Task Throws(Expression <Func <Task> > expression)
        {
            var exception = await AssertImpl.Throws(expression);

            if (exception != null)
            {
                throw exception;
            }
        }
예제 #4
0
        public static void Throws <TException>(Expression <Func <object> > expression) where TException : Exception
        {
            var exception = AssertImpl.Throws(expression, typeof(TException));

            if (exception != null)
            {
                throw exception;
            }
        }
예제 #5
0
        public static void Throws(Expression <Action> expression)
        {
            var exception = AssertImpl.Throws(expression);

            if (exception != null)
            {
                throw exception;
            }
        }
예제 #6
0
        public static void That(Expression <Func <bool> > assertion, object message, Expression <Func <object> > context)
        {
            var exception = AssertImpl.That(assertion, message, context);

            if (exception != null)
            {
                throw exception;
            }
        }
예제 #7
0
        public static void Assert(Expression <Func <bool> > assertion, object message)
        {
            var exception = AssertImpl.That(assertion, message, null);

            if (exception != null)
            {
                throw exception;
            }
        }