예제 #1
0
        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));
        }
예제 #2
0
        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));
        }