Ejemplo n.º 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;
            }
        }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 3
0
        public static async Task Throws(Expression <Func <Task> > expression)
        {
            var exception = await AssertImpl.Throws(expression);

            if (exception != null)
            {
                throw exception;
            }
        }
Ejemplo n.º 4
0
        public static void Throws(Expression <Action> expression)
        {
            var exception = AssertImpl.Throws(expression);

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