public void MyEncodeTest() { string a = "Mysoft95938"; string expected = "50626qclpvJ"; string actual = EncrptionHelper.MyEncode(a); Assert.AreEqual(expected, actual); }
public void MyDecodeTest() { string a = "6.707"; string expected = "95938"; string actual = EncrptionHelper.MyDecode(a); Assert.AreEqual(expected, actual); }
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); } }