コード例 #1
0
 public void Init()
 {
     _calculationsApi   = new CalculationsApi(CommonFunctions.BuildConfiguration(Engine.SPAR));
     _utilityApi        = new UtilityApi(CommonFunctions.BuildConfiguration(Engine.SPAR));
     _componentsApi     = new ComponentsApi(CommonFunctions.BuildConfiguration(Engine.SPAR));
     _configurationsApi = new ConfigurationsApi(CommonFunctions.BuildConfiguration(Engine.SPAR));
 }
        public void DocumentsApi_Get_SPARDocuments_List_Success()
        {
            _documentsApi = new DocumentsApi(CommonFunctions.BuildConfiguration(Engine.SPAR));
            var response = _documentsApi.GetSPAR3DocumentsWithHttpInfo(CommonParameters.DefaultLookupDirectory);

            Assert.IsTrue(response.StatusCode == HttpStatusCode.OK, "Response should be 200 - OK");
            Assert.IsTrue(response.Data != null, "Response data should not be null");
            Assert.IsTrue(response.Data.GetType() == typeof(DocumentDirectories), "Response Data should be of DocumentDirectories type");
        }
コード例 #3
0
        public void FrequenciesApi_Get_VaultFrequencies_Success()
        {
            _frequenciesApi = new FrequenciesApi(CommonFunctions.BuildConfiguration(Engine.VAULT));
            var vaultFrequenciesResponse = _frequenciesApi.GetVaultFrequenciesWithHttpInfo();

            Assert.IsTrue(vaultFrequenciesResponse.StatusCode == HttpStatusCode.OK, "Response should be 200 - OK");
            Assert.IsTrue(vaultFrequenciesResponse.Data.GetType() == typeof(Dictionary <string, Frequency>), "Response result should be of Frequency Dictionary type.");
            Assert.IsTrue(vaultFrequenciesResponse.Data.Count != 0, "Response data should not be null.");
        }
コード例 #4
0
        public void ComponentsApi_Get_SparComponents_Success()
        {
            _componentsApi = new ComponentsApi(CommonFunctions.BuildConfiguration(Engine.SPAR));
            var componentGetAllResponse = _componentsApi.GetSPARComponentsWithHttpInfo(CommonParameters.SPARDefaultDocument);

            Assert.IsTrue(componentGetAllResponse.StatusCode == HttpStatusCode.OK, "Response should be 200 - OK");
            Assert.IsTrue(componentGetAllResponse.Data.GetType() == typeof(Dictionary <string, ComponentSummary>), "Response result should be of ComponentSummary Dictionary type.");
            Assert.IsTrue(componentGetAllResponse.Data.Count != 0, "Response data should not be null.");
        }
コード例 #5
0
        public void ComponentsApi_Get_VaultComponentById_Success()
        {
            _componentsApi = new ComponentsApi(CommonFunctions.BuildConfiguration(Engine.VAULT));
            var vaultComponents  = _componentsApi.GetVaultComponentsWithHttpInfo(CommonParameters.VaultDefaultDocument);
            var vaultComponentId = vaultComponents.Data.Keys.First();

            var componentGetByIdResponse = _componentsApi.GetVaultComponentByIdWithHttpInfo(vaultComponentId);

            Assert.IsTrue(componentGetByIdResponse.StatusCode == HttpStatusCode.OK, "Response should be 200 - OK");
            Assert.IsTrue(componentGetByIdResponse.Data != null, "Response data should not be null");
            Assert.IsTrue(componentGetByIdResponse.Data.GetType() == typeof(VaultComponent), "Response result should be of VaultComponent type");
        }
コード例 #6
0
        public void DatesApi_PADatesToAbsoluteFormat_Success()
        {
            _datesApi = new DatesApi(CommonFunctions.BuildConfiguration(Engine.PA));
            var endDate = "-1M";
            // Hard coding this as we won't know if the component requires start date
            var componentId = "918EE8207D259B54E2FDE2AAA4D3BEA9248164123A904F298B8438B76F9292EB";
            var account     = CommonParameters.DefaultPADatesAccount;

            var datesResponse = _datesApi.ConvertPADatesToAbsoluteFormatWithHttpInfo(endDate, componentId, account);

            Assert.IsTrue(datesResponse.StatusCode == HttpStatusCode.OK, "Response should be 200 - OK");
            Assert.IsTrue(datesResponse.Data.GetType() == typeof(DateParametersSummary), "Response Should be of DateParametersSummary type.");
            Assert.IsTrue(datesResponse.Data != null, "Response data should not be null");
        }
コード例 #7
0
        public void DatesApi_VaultDatesToAbsoluteFormat_Success()
        {
            componentsApi = new ComponentsApi(CommonFunctions.BuildConfiguration());
            var endDate          = "-1M";
            var account          = CommonParameters.VaultDefaultAccount;
            var vaultComponents  = componentsApi.GetVaultComponentsWithHttpInfo(CommonParameters.VaultDefaultDocument);
            var vaultComponentId = vaultComponents.Data.Data.Keys.First();

            var datesResponse = datesApi.ConvertVaultDatesToAbsoluteFormatWithHttpInfo(endDate, vaultComponentId, account);

            Assert.IsTrue(datesResponse.StatusCode == HttpStatusCode.OK, "Response should be 200 - OK");
            Assert.IsTrue(datesResponse.Data.Data.GetType() == typeof(DateParametersSummary), "Response Should be of DateParametersSummary type.");
            Assert.IsTrue(datesResponse.Data.Data != null, "Response data should not be null");
        }
コード例 #8
0
        public static string GetRandomColumnId()
        {
            var columnsApi = new ColumnsApi(CommonFunctions.BuildConfiguration());

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            var columnsGetAllResponse = columnsApi.GetPAColumnsWithHttpInfo();

            var r           = new Random();
            var randomIndex = r.Next(columnsGetAllResponse.Data.Data.Count);

            var currentIndex = 0;

            foreach (var pair in columnsGetAllResponse.Data.Data)
            {
                if (currentIndex == randomIndex)
                {
                    return(pair.Key);
                }

                currentIndex++;
            }

            return(null);
        }
コード例 #9
0
 public void Init()
 {
     _accountsApi = new AccountsApi(CommonFunctions.BuildConfiguration(Engine.PA));
 }
コード例 #10
0
 public void Init()
 {
     _calculationsApi   = new VaultCalculationsApi(CommonFunctions.BuildConfiguration(Engine.VAULT));
     _componentsApi     = new ComponentsApi(CommonFunctions.BuildConfiguration(Engine.VAULT));
     _configurationsApi = new ConfigurationsApi(CommonFunctions.BuildConfiguration(Engine.VAULT));
 }
 public void Init()
 {
     bpmOptimizerApi = new BPMOptimizerApi(CommonFunctions.BuildConfiguration());
 }
コード例 #12
0
 public void Init()
 {
     sparCalculationsApi = new SPARCalculationsApi(CommonFunctions.BuildConfiguration());
     componentsApi       = new ComponentsApi(CommonFunctions.BuildConfiguration());
 }
コード例 #13
0
 public void Init()
 {
     _calculationsApi = new CalculationsApi(CommonFunctions.BuildConfiguration(Engine.PUB));
     _utilityApi      = new UtilityApi(CommonFunctions.BuildConfiguration(Engine.PUB));
 }
コード例 #14
0
 public void Init()
 {
     _columnStatisticsApi = new ColumnStatisticsApi(CommonFunctions.BuildConfiguration(Engine.PA));
     ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
 }
コード例 #15
0
 public void Init()
 {
     axpOptimizerApi = new AXPOptimizerApi(CommonFunctions.BuildConfiguration());
 }
コード例 #16
0
 public void Init()
 {
     _calculationsApi = new PACalculationsApi(CommonFunctions.BuildConfiguration(Engine.PA));
     _componentsApi   = new ComponentsApi(CommonFunctions.BuildConfiguration(Engine.PA));
 }
コード例 #17
0
 public void Init()
 {
     calculationsApi = new PubCalculationsApi(CommonFunctions.BuildConfiguration());
 }
コード例 #18
0
 public void Init()
 {
     accountsApi = new AccountsApi(CommonFunctions.BuildConfiguration());
     ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
 }
コード例 #19
0
 public void Init()
 {
     vaultCalculationsApi = new VaultCalculationsApi(CommonFunctions.BuildConfiguration());
     componentsApi        = new ComponentsApi(CommonFunctions.BuildConfiguration());
     configurationsApi    = new ConfigurationsApi(CommonFunctions.BuildConfiguration());
 }