Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        public void ThrowIfNull_HDC_ParamIsNotNull()
        {
            var param = new global::Interop.Gdi32.HDC(new IntPtr(24));

            ArgumentValidation.ThrowIfNull(param);
        }