예제 #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");