public void NullIdentityGuidValueValidator() { _testLeadEntity.Context = new IContext[] { new DefaultContext(Modules.LeadEntity.Interface.Constants.ContextKeys.IdentityGuidKey, null) }; var identityGuidValidator = new IdentityGuidValidator(); var actualValue = identityGuidValidator.ValidLead(_testLeadEntity); bool expectedValue = false; Assert.AreEqual(expectedValue, actualValue); }
public void ValidIdentityGuidValidator() { _testLeadEntity.Context = new IContext[] { new DefaultContext(Modules.LeadEntity.Interface.Constants.ContextKeys.IdentityGuidKey, Guid.NewGuid().ToString()) }; var identityGuidValidator = new IdentityGuidValidator(); var actualValue = identityGuidValidator.ValidLead(_testLeadEntity); bool expectedValue = true; Assert.AreEqual(expectedValue, actualValue); }
public void InvalidIdentityGuidValidatorKey() { _testLeadEntity.Context = new IContext[] { new DefaultContext(null, Guid.NewGuid().ToString()) }; var identityGuidValidator = new IdentityGuidValidator(); var actualValue = identityGuidValidator.ValidLead(_testLeadEntity); bool expectedValue = false; Assert.AreEqual(expectedValue, actualValue); }
public void IdentityGuidValidator() { var validator = _serviceProvider.GetService <IValidator>(); _testLeadEntity.Context = new IContext[] { new DefaultContext(Modules.LeadEntity.Interface.Constants.ContextKeys.IdentityGuidKey, Guid.NewGuid().ToString()) }; var identityGuid = new IdentityGuidValidator(); identityGuid.ValidLead(_testLeadEntity); bool expectedValue = false; var actualValue = validator.ValidLead(_testLeadEntity); Assert.AreEqual(expectedValue, actualValue); }