Example #1
0
        public void IsType()
        {
            ExceptionAssert.Throws <ArgumentNullException>(() => Assumes.IsType(null, typeof(string), "foo"));
            ExceptionAssert.Throws(debugAssertException, () => Assumes.IsType(2, typeof(string), "foo"));
            Assumes.IsType(String.Empty, typeof(string), "foo");

            ExceptionAssert.Throws <ArgumentNullException>(() => Assumes.IsType <string>(null, "foo"));
            ExceptionAssert.Throws(debugAssertException, () => Assumes.IsType <string>(2, "foo"));
            Assumes.IsType <string>(String.Empty, "foo");
        }