public void SetIsValidated_WhenNotValidated_DoesNotIncrementsStep() { 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.SetIsValidated(); Assert.AreEqual(RegistrationStep.RegisterIdentity, tagProfile.Step); }
public void SetIsValidated_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); }
public void ClearPin_WhenComplete_DoesNotDecrementStep() { 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); tagProfile.ClearPin(); Assert.AreEqual(RegistrationStep.Complete, tagProfile.Step); }