public static void IsNotNull <T>(this TestAssert assert, T obj, string message = null) where T : class { if (obj == null) { assert.Failure(message ?? "断言失败,期望对象不为空,但对象为空"); } }