private void postProcess(BVParameters bvParameters) { bvFooter = new BVHTMLFooter(_bvConfiguration, bvParameters); message = new StringBuilder(); /* * Validator to check if all the bvParameters are valid. */ bvParamValidator = new BVDefaultValidator(); validationError = bvParamValidator.validate(_bvConfiguration, bvParameters); if (!String.IsNullOrEmpty(validationError)) { return; } reloadContent = bvParameters.Equals(this.bvParameters); if (!reloadContent) { this.bvParameters = bvParameters; bvSeoSdkUrl = new BVSeoSdkURLBuilder(_bvConfiguration, bvParameters); bvUiContentService = new BVUIContentServiceProvider(_bvConfiguration); bvUiContentService.setBVParameters(this.bvParameters); bvUiContentService.setBVSeoSdkUrl(bvSeoSdkUrl); } bvFooter.setBvSeoSdkUrl(bvSeoSdkUrl); }
public void TestValidation_When_BVConfig_Is_Null() { bvConfig = null; bvParams = null; bvValidator = new BVDefaultValidator(); errorMessage = bvValidator.validate(bvConfig, bvParams); Assert.AreEqual <Boolean>(errorMessage.Contains("BVConfiguration is null, please set a valid BVConfiguration.;"), true, "Error Messages are different."); bvConfig = new BVSdkConfiguration(); bvParams = new BVParameters(); bvValidator = new BVDefaultValidator(); errorMessage = bvValidator.validate(bvConfig, bvParams); Assert.AreEqual <Boolean>(errorMessage.Contains("SubjectId cannot be null or empty.;"), true, "Error Messages are different."); }
public void TestValidation_When_BVConfig_Is_Null() { bvConfig = null; bvParams = null; bvValidator = new BVDefaultValidator(); errorMessage = bvValidator.validate(bvConfig, bvParams); Assert.AreEqual<Boolean>(errorMessage.Contains("BVConfiguration is null, please set a valid BVConfiguration.;"), true, "Error Messages are different."); bvConfig = new BVSdkConfiguration(); bvParams = new BVParameters(); bvValidator = new BVDefaultValidator(); errorMessage = bvValidator.validate(bvConfig, bvParams); Assert.AreEqual<Boolean>(errorMessage.Contains("SubjectId cannot be null or empty.;"), true, "Error Messages are different."); }