Пример #1
0
        public static void NotNullUnconstrained2()
        {
            Object obj       = null;
            var    paramName = "paramName";
            Action act       = () => Require.NotNullUnconstrained(obj, paramName);

            var ex = Record.Exception(act);

            Assert.NotNull(ex);
            Assert.NotNull(ex.Message);
            var argex = Assert.IsType <ArgumentNullException>(ex);

            Assert.Equal(paramName, argex.ParamName);
        }
Пример #2
0
 public static void NotNullUnconstrained_DoesNotThrow_ForNonNull()
 => Require.NotNullUnconstrained(new Object(), "paramName");
Пример #3
0
 public static void NotNullUnconstrained_DoesNotThrow_ForStruct()
 => Require.NotNullUnconstrained(new My.EmptyStruct(), "paramName");