public void when_key_is_invalid_should_throw_ArgumentException() { var clearByte = new byte[] { 1 }; var key = new byte[] { 1, 2 }; Assert.Throws <ArgumentException>(() => clearByte.AESEncrypt(key)); }
public void when_key_is_null_should_throw_ArgumentNullException() { var clearBytes = new byte[] { 1 }; var key = (byte[])null; // ReSharper disable once ExpressionIsAlwaysNull Assert.Throws <ArgumentNullException>(() => clearBytes.AESEncrypt(key)); }