예제 #1
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;
            }
        }
예제 #2
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;
            }
        }
예제 #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(Expression <Action> expression)
        {
            var exception = AssertImpl.Throws(expression);

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