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); }
public static void NotNullUnconstrained_DoesNotThrow_ForNonNull() => Require.NotNullUnconstrained(new Object(), "paramName");
public static void NotNullUnconstrained_DoesNotThrow_ForStruct() => Require.NotNullUnconstrained(new My.EmptyStruct(), "paramName");