public void ThrowIfNull_HDC_DifferentParamName() { var param = new global::Interop.Gdi32.HDC(IntPtr.Zero); var exception = Assert.Throws <ArgumentNullException>(() => ArgumentValidation.ThrowIfNull(param, "paramName")); Assert.Equal("paramName", exception.ParamName); }
public void ThrowIfNull_HDC_ParamIsNull() { var param = new global::Interop.Gdi32.HDC(IntPtr.Zero); var exception = Assert.Throws <ArgumentNullException>(() => ArgumentValidation.ThrowIfNull(param)); Assert.Equal(nameof(param), exception.ParamName); }
public void ThrowIfNull_HDC_ParamIsNotNull() { var param = new global::Interop.Gdi32.HDC(new IntPtr(24)); ArgumentValidation.ThrowIfNull(param); }