コード例 #1
0
        public void Encrypted()
        {
            CustomHelperTestClass tc = TestClass;

            mocks.ViewDataContainer.Object.ViewData[IdHelper.NofEncryptDecrypt] = new SimpleEncryptDecrypt();

            // keys to make test reproduceable
            byte[] key  = GetConstantKey(32);
            byte[] iv   = GetConstantKey(16);
            var    data = new Tuple <byte[], byte[]>(key, iv);

            mocks.HttpContext.Object.Session.Add(SimpleEncryptDecrypt.EncryptFieldData, data);

            string result = mocks.HtmlHelper.Encrypted("name", "value").ToString();

            Assert.AreEqual(@"<input name=""-encryptedField-name"" type=""hidden"" value=""+xG+YO3ZY8KuTB6z4pUXjQ=="" />", result);
        }
コード例 #2
0
 public int FourRefParametersFunction(CustomHelperTestClass parm1, CustomHelperTestClass parm2, CustomHelperTestClass parm3, CustomHelperTestClass parm4) {
     return 0;
 }
コード例 #3
0
 public int ThreeRefParametersFunction(CustomHelperTestClass parm1, CustomHelperTestClass parm2, CustomHelperTestClass parm3) {
     return 0;
 }
コード例 #4
0
 public int TwoRefParametersFunction(CustomHelperTestClass parm1, CustomHelperTestClass parm2) {
     return 0;
 }
コード例 #5
0
 public int OneRefParameterFunction(CustomHelperTestClass parm) {
     return 0;
 }
コード例 #6
0
 public void FourRefParametersAction(CustomHelperTestClass parm1, CustomHelperTestClass parm2, CustomHelperTestClass parm3, CustomHelperTestClass parm4) {}
コード例 #7
0
 public void ThreeRefParametersAction(CustomHelperTestClass parm1, CustomHelperTestClass parm2, CustomHelperTestClass parm3) {}
コード例 #8
0
 public void TwoRefParametersAction(CustomHelperTestClass parm1, CustomHelperTestClass parm2) {}
コード例 #9
0
 public void OneRefParameterAction(CustomHelperTestClass parm) {}
コード例 #10
0
 public int FourRefParametersFunction(CustomHelperTestClass parm1, CustomHelperTestClass parm2, CustomHelperTestClass parm3, CustomHelperTestClass parm4)
 {
     return(0);
 }
コード例 #11
0
 public int ThreeRefParametersFunction(CustomHelperTestClass parm1, CustomHelperTestClass parm2, CustomHelperTestClass parm3)
 {
     return(0);
 }
コード例 #12
0
 public int OneRefParameterFunction(CustomHelperTestClass parm)
 {
     return(0);
 }
コード例 #13
0
 public void FourRefParametersAction(CustomHelperTestClass parm1, CustomHelperTestClass parm2, CustomHelperTestClass parm3, CustomHelperTestClass parm4)
 {
 }
コード例 #14
0
 public void ThreeRefParametersAction(CustomHelperTestClass parm1, CustomHelperTestClass parm2, CustomHelperTestClass parm3)
 {
 }
コード例 #15
0
 public void TwoRefParametersAction(CustomHelperTestClass parm1, CustomHelperTestClass parm2)
 {
 }
コード例 #16
0
 public void OneRefParameterAction(CustomHelperTestClass parm)
 {
 }