public void HmacRequires_AllArguments() { var hmacMock = new Mock <HMAC>(); var ex1 = Assert.Throws <ArgumentNullException>(() => ByteArrayExtensions.Hmac(null, hmacMock.Object)); var ex2 = Assert.Throws <ArgumentNullException>(() => new byte[0].Hmac(hmacMock.Object)); var ex3 = Assert.Throws <ArgumentNullException>(() => new byte[1].Hmac(null)); Assert.Equal("bytes", ex1.ParamName); Assert.Equal("bytes", ex2.ParamName); Assert.Equal("hmac", ex3.ParamName); }