コード例 #1
0
        public void MyEncodeTest()
        {
            string a        = "Mysoft95938";
            string expected = "50626qclpvJ";
            string actual   = EncrptionHelper.MyEncode(a);

            Assert.AreEqual(expected, actual);
        }
コード例 #2
0
        public void MyDecodeTest()
        {
            string a        = "6.707";
            string expected = "95938";
            string actual   = EncrptionHelper.MyDecode(a);

            Assert.AreEqual(expected, actual);
        }
コード例 #3
0
        public override void Install(System.Collections.IDictionary stateSaver)
        {
            base.Install(stateSaver);

            try
            {
                //For testing purpose only.. work only in debug mode when pdb files are deployed as well.
                //Debugger.Break();

                installationDirectory = Context.Parameters["INSTALLDIR"];

                //I believe, the config file must be located in the installation directory if so, then use the following way to compute path

                string configFilePath = Path.Combine(installationDirectory, "myConfigFile.config");
                EncrptionHelper.SetValue(configFilePath, "testKey", "testValue");
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex.Message);
            }
        }