Exemplo n.º 1
0
        public void SetUserNameConcurrentUpdateTest()
        {
            IFavorite sendaryFavorite = this.SecondaryFavorites.First();

            this.SecondaryFavorites.Delete(sendaryFavorite);
            PrimaryFavorites.ApplyUserNameToAllFavorites(this.TestFavorites, VALIDATION_VALUE);
        }
Exemplo n.º 2
0
        public void SetPasswordToAllFavoritesTest()
        {
            PrimaryFavorites.SetPasswordToAllFavorites(this.TestFavorites, VALIDATION_VALUE);

            foreach (IFavorite secondaryFavorite in SecondaryFavorites)
            {
                var guarded = this.CreateGuardedSecurity(secondaryFavorite);
                Assert.AreEqual(VALIDATION_VALUE, guarded.Password, "Password was not set properly to all favorites");
            }
        }
Exemplo n.º 3
0
        public void ApplyDomainNameToAllFavoritesTest()
        {
            PrimaryFavorites.ApplyDomainNameToAllFavorites(this.TestFavorites, VALIDATION_VALUE);

            foreach (IFavorite secondaryFavorite in SecondaryFavorites)
            {
                var guarded = this.CreateGuardedSecurity(secondaryFavorite);
                Assert.AreEqual(VALIDATION_VALUE, guarded.Domain, "Domain name was not set properly to all favorites");
            }
        }
Exemplo n.º 4
0
        public void ApplyUserNameToAllFavoritesTest()
        {
            PrimaryFavorites.ApplyUserNameToAllFavorites(this.TestFavorites, VALIDATION_VALUE);

            foreach (IFavorite secondaryFavorite in SecondaryFavorites)
            {
                var guarded = new GuardedSecurity(this.PrimaryPersistence, secondaryFavorite.Security);
                Assert.AreEqual(VALIDATION_VALUE, guarded.UserName, "User name was not set properly to all favorites");
            }
        }
Exemplo n.º 5
0
        public void ApplyCredentialsToAllFavoritesTest()
        {
            ICredentialSet credentialSet = PrimaryFactory.CreateCredentialSet();

            credentialSet.Name = VALIDATION_VALUE;
            PrimaryPersistence.Credentials.Add(credentialSet);
            PrimaryFavorites.ApplyCredentialsToAllFavorites(this.TestFavorites, credentialSet);

            foreach (IFavorite secondaryFavorite in SecondaryFavorites)
            {
                Guid finalCredential = secondaryFavorite.Security.Credential;
                Assert.AreNotEqual(Guid.Empty, finalCredential, "Credential was not set properly to all favorites");
            }

            this.AssertStoredCredentialsCount();
        }