Exemplo n.º 1
0
        public void SetPin_IfNotOnPinStep_DoesNotIncrementStep()
        {
            TagProfile tagProfile = new TagProfile();

            Assert.AreEqual(RegistrationStep.Operator, tagProfile.Step);
            tagProfile.SetDomain("domain");
            Assert.AreEqual(RegistrationStep.Account, tagProfile.Step);
            tagProfile.SetAccount("account", "hash", "hashMethod");
            Assert.AreEqual(RegistrationStep.RegisterIdentity, tagProfile.Step);
            tagProfile.SetPin("pin", false);
            Assert.AreEqual(RegistrationStep.RegisterIdentity, tagProfile.Step);
        }
Exemplo n.º 2
0
        public void SetPin_IncrementsStep()
        {
            TagProfile tagProfile = new TagProfile();

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

            tagProfile.SetLegalIdentity(identity);
            Assert.AreEqual(RegistrationStep.ValidateIdentity, tagProfile.Step);
            tagProfile.SetIsValidated();
            Assert.AreEqual(RegistrationStep.Pin, tagProfile.Step);
            tagProfile.SetPin("pin", false);
            Assert.AreEqual(RegistrationStep.Complete, tagProfile.Step);
        }