示例#1
0
        public void SetAccountAndLegalIdentity_ToAnInvalidValue1_DoesNotIncrementsStep()
        {
            TagProfile tagProfile = new TagProfile();

            Assert.AreEqual(RegistrationStep.Operator, tagProfile.Step);
            tagProfile.SetDomain("domain");
            Assert.AreEqual(RegistrationStep.Account, tagProfile.Step);
            tagProfile.SetAccountAndLegalIdentity("account", "hash", "hashMethod", null);
            Assert.AreEqual(RegistrationStep.Account, tagProfile.Step);
        }
示例#2
0
        public void SetAccountAndLegalIdentity_ToAnInvalidValue2_DoesNotIncrementsStep()
        {
            TagProfile tagProfile = new TagProfile();

            Assert.AreEqual(RegistrationStep.Operator, tagProfile.Step);
            tagProfile.SetDomain("domain");
            Assert.AreEqual(RegistrationStep.Account, tagProfile.Step);
            LegalIdentity identity = new LegalIdentity {
                State = IdentityState.Compromised
            };

            tagProfile.SetAccountAndLegalIdentity("", "hash", "hashMethod", identity);
            Assert.AreEqual(RegistrationStep.Account, tagProfile.Step);
        }
示例#3
0
        public void SetAccountAndLegalIdentity_ToAValidValue_WhereIdentityIsApproved_IncrementsStep()
        {
            TagProfile tagProfile = new TagProfile();

            Assert.AreEqual(RegistrationStep.Operator, tagProfile.Step);
            tagProfile.SetDomain("domain");
            Assert.AreEqual(RegistrationStep.Account, tagProfile.Step);
            LegalIdentity identity = new LegalIdentity {
                State = IdentityState.Approved
            };

            tagProfile.SetAccountAndLegalIdentity("account", "hash", "hashMethod", identity);
            Assert.AreEqual(RegistrationStep.ValidateIdentity, tagProfile.Step);
        }