Esempio n. 1
0
        public void ProtectedString_DoesNotEqualUnprotectedString()
        {
            var unprotectedString = "Testing 123";
            var protectedString   = Protector.ProtectString(unprotectedString);

            Assert.NotEqual(protectedString, unprotectedString);
        }
Esempio n. 2
0
        public void ProtectedString_Unprotected_EqualsOriginalUnprotectedString()
        {
            var unprotectedString = "Testing 123";
            var protectedString   = Protector.ProtectString(unprotectedString);

            var recoveredString = Protector.UnprotectString(protectedString);

            Assert.Equal(recoveredString, unprotectedString);
        }
Esempio n. 3
0
        public static DataAccessAction UpdateBuild(Build build)
        {
            return(new DataAccessAction((ICrmPlusPlus crm) =>
            {
                build.Validate();
                build.Password = Protector.ProtectString(build.Password);

                crm.EntityClient.Update(build);
            }));
        }