コード例 #1
0
        public void ClearAccount_DecrementsStepToOperator()
        {
            TagProfile tagProfile = new TagProfile();

            Assert.AreEqual(RegistrationStep.Operator, tagProfile.Step);
            tagProfile.SetDomain("domain");
            Assert.AreEqual(RegistrationStep.Account, tagProfile.Step);
            tagProfile.SetAccount("account", "hash", "hashMethod");
            tagProfile.SetLegalJId("jid");
            Assert.AreEqual(RegistrationStep.RegisterIdentity, tagProfile.Step);
            tagProfile.ClearAccount();
            Assert.AreEqual(RegistrationStep.Operator, tagProfile.Step);
            Assert.IsNull(tagProfile.LegalJid);
        }
コード例 #2
0
        public void ClearIsValidated_DecrementsStep()
        {
            TagProfile tagProfile = new TagProfile();

            Assert.AreEqual(RegistrationStep.Operator, tagProfile.Step);
            tagProfile.SetDomain("domain");
            Assert.AreEqual(RegistrationStep.Account, tagProfile.Step);
            tagProfile.SetAccount("account", "hash", "hashMethod");
            tagProfile.SetLegalJId("jid");
            Assert.AreEqual(RegistrationStep.RegisterIdentity, tagProfile.Step);
            LegalIdentity identity = new LegalIdentity {
                State = IdentityState.Approved
            };

            tagProfile.SetLegalIdentity(identity);
            Assert.AreEqual(RegistrationStep.ValidateIdentity, tagProfile.Step);
            tagProfile.ClearIsValidated();
            Assert.AreEqual(RegistrationStep.RegisterIdentity, tagProfile.Step);
            Assert.IsNull(tagProfile.LegalIdentity);
            Assert.AreEqual("jid", tagProfile.LegalJid);
        }