public void TestCaseInitialize() { this.sutControlAdapterInstance = this.Site.GetAdapter <IMS_VERSSSUTControlAdapter>(); this.protocolAdapterInstance = this.Site.GetAdapter <IMS_VERSSAdapter>(); Common.CheckCommonProperties(this.Site, true); this.listsSutControlAdaterInstance = this.Site.GetAdapter <IMS_LISTSWSSUTControlAdapter>(); #region Initialize the variables string datetimestamp = Common.FormatCurrentDateTime(); this.requestUrl = Common.GetConfigurationPropertyValue("RequestUrl", this.Site); this.documentLibrary = Common.GetConfigurationPropertyValue("DocumentLibraryName", this.Site) + "_" + datetimestamp; string fileNameValue = Common.GetConfigurationPropertyValue("FileName", this.Site); this.fileName = System.IO.Path.GetFileNameWithoutExtension(fileNameValue) + "_" + datetimestamp + System.IO.Path.GetExtension(fileNameValue); this.fileRelativeUrl = this.documentLibrary + "/" + this.fileName; Uri requestUri = new Uri(this.requestUrl); this.fileAbsoluteUrl = AdapterHelper.ConstructDocFileFullUrl(requestUri, this.documentLibrary, this.fileName); #endregion #region Initialize the server bool isAddList = this.listsSutControlAdaterInstance.AddList(this.documentLibrary); Site.Assume.IsTrue( isAddList, "AddList operation returns {0}, TRUE means the operation was executed successfully," + " FALSE means the operation failed", isAddList); #endregion this.testSuiteHelper = new TestSuiteHelper( this.Site, this.documentLibrary, this.fileName, this.listsSutControlAdaterInstance, this.protocolAdapterInstance, this.sutControlAdapterInstance); }
public void TestCaseInitialize() { this.sutControlAdapterInstance = this.Site.GetAdapter<IMS_VERSSSUTControlAdapter>(); this.protocolAdapterInstance = this.Site.GetAdapter<IMS_VERSSAdapter>(); Common.CheckCommonProperties(this.Site, true); this.listsSutControlAdaterInstance = this.Site.GetAdapter<IMS_LISTSWSSUTControlAdapter>(); #region Initialize the variables string datetimestamp = Common.FormatCurrentDateTime(); this.documentLibrary = Common.GetConfigurationPropertyValue("DocumentLibraryName", this.Site) + "_" + datetimestamp; string fileNameValue = Common.GetConfigurationPropertyValue("FileName", this.Site); this.fileName = System.IO.Path.GetFileNameWithoutExtension(fileNameValue) + "_" + datetimestamp + System.IO.Path.GetExtension(fileNameValue); this.fileRelativeUrl = this.documentLibrary + "/" + this.fileName; #endregion #region Initialize the server bool isAddList = this.listsSutControlAdaterInstance.AddList(this.documentLibrary); Site.Assert.IsTrue( isAddList, "AddList operation returns {0}, TRUE means the operation was executed successfully," + " FALSE means the operation failed", isAddList); #endregion this.testSuiteHelper = new TestSuiteHelper( this.Site, this.documentLibrary, this.fileName, this.listsSutControlAdaterInstance, this.protocolAdapterInstance, this.sutControlAdapterInstance); }