示例#1
0
        public void POSTBackgroundProcess_PositiveTest()
        {
            InitializeActions();

            Method = HttpVerbs.Post;
            Route  = "BackgroundProcess";
            ExpectedResponseType           = typeof(bool);
            ExpectedResponseHttpStatusCode = HttpStatusCode.OK;

            Entity = "TransferDetails";
            Body   = JSONData.GetEntityFromJSONFile(Entity);

            pdfConversionActions.ClearURLData();

            var result = pdfConversionActions.RunAPI <bool>(EndPoint, Route, Method, Body);

            Verification(pdfConversionActions, result);
        }
示例#2
0
        public void POSTCreateApplication_PositiveTest()
        {
            InitializeActions();

            Method = HttpVerbs.Post;
            Route  = "Application";
            ExpectedResponseType           = typeof(CareingtonResponse);
            ExpectedResponseHttpStatusCode = HttpStatusCode.OK;

            Entity = "CareingtonApplicationContent";
            Body   = JSONData.GetEntityFromJSONFile(Entity);

            careingtonActions.ClearURLData();

            var result = careingtonActions.RunAPI <CareingtonResponse>(EndPoint, Route, Method, Body);

            Verification(careingtonActions, result);
        }
示例#3
0
        public void POSTAddState_PositiveTest()
        {
            InitializeActions();

            Method = HttpVerbs.Post;
            Route  = "Add";
            ExpectedResponseType           = typeof(bool);
            ExpectedResponseHttpStatusCode = HttpStatusCode.OK;

            Entity = "StateModel";
            Body   = JSONData.GetEntityFromJSONFile(Entity);

            stateActions.ClearURLData();

            var result = stateActions.RunAPI <bool>(EndPoint, Route, Method, Body);

            Verification(stateActions, result);
        }
示例#4
0
        public void POSTGetProductOptions_PositiveTest()
        {
            InitializeActions();

            Method = HttpVerbs.Post;
            Route  = "ProductOptions";

            ExpectedResponseType           = typeof(ProductOptionValueViewModel);
            ExpectedResponseHttpStatusCode = HttpStatusCode.OK;

            Entity = "OptionValueChangeRequest";
            Body   = JSONData.GetEntityFromJSONFile(Entity);

            quoteActions.ClearURLData();

            var result = quoteActions.RunAPI <ProductOptionValueViewModel>(EndPoint, Route, Method, Body);

            Verification(quoteActions, result);
        }
示例#5
0
        public void PUTState_PositiveTest()
        {
            InitializeActions();

            Method = HttpVerbs.Put;
            Route  = null;
            ExpectedResponseType           = typeof(bool);
            ExpectedResponseHttpStatusCode = HttpStatusCode.OK;

            Entity = "StateModel";
            Body   = JSONData.GetEntityFromJSONFile(Entity);

            stateActions.ClearURLData();
            stateActions.AddURLData("{id:int}", TestsRunParams["TestStateID"]);

            var result = stateActions.RunAPI <bool>(EndPoint, Route, Method, Body);

            Verification(stateActions, result);
        }
        public void GETByAgent_PositiveTest()
        {
            InitializeActions();

            Method = HttpVerbs.Get;
            Route  = "Agent";
            ExpectedResponseType           = typeof(LoadChartModel);
            ExpectedResponseHttpStatusCode = HttpStatusCode.OK;

            Entity = "LoadChartModel";
            Body   = JSONData.GetEntityFromJSONFile(Entity);

            dashboardChartActions.ClearURLData();
            dashboardChartActions.AddURLData("{agentid:int}", TestsRunParams["TestAgentID"]);

            var result = dashboardChartActions.RunAPI <LoadChartModel>(EndPoint, Route, Method, Body);

            Verification(dashboardChartActions, result);
        }
示例#7
0
        public void POSTAddAgency_PositiveTest()
        {
            InitializeActions();

            Method = HttpVerbs.Post;
            Entity = "AgencyModel";
            Route  = "Add";
            ExpectedResponseType           = typeof(bool);
            ExpectedResponseHttpStatusCode = HttpStatusCode.OK;
            Body = JSONData.GetEntityFromJSONFile(Entity);

            agencyActions.ClearURLData();

            #region General Actions
            var result = agencyActions.RunAPI <bool>(EndPoint, Route, Method, Body);
            #endregion

            Verification(agencyActions, result);
        }
        public void POSTSendSms_PositiveTest()
        {
            InitializeActions();

            Method = HttpVerbs.Post;
            Route  = null;
            Entity = "SmsModel";
            Body   = JSONData.GetEntityFromJSONFile(Entity);

            //Need to check
            ExpectedResponseType           = typeof(bool);
            ExpectedResponseHttpStatusCode = HttpStatusCode.OK;

            applicationActions.ClearURLData();

            var result = applicationActions.RunAPI <bool>(EndPoint, Route, Method, Body);

            Verification(applicationActions, result);
        }
        public void POSTPolicyNumber_PositiveTest()
        {
            InitializeActions();

            Method = HttpVerbs.Post;
            Route  = "PolicyBlock/Create";
            //typeof N/A in controller class
            ExpectedResponseType           = typeof(bool);
            ExpectedResponseHttpStatusCode = HttpStatusCode.OK;

            Entity = "PolicyNumberBlockModel";
            Body   = JSONData.GetEntityFromJSONFile(Entity);

            policyNumberActions.ClearURLData();
            policyNumberActions.AddURLData("policyNumberBlock", TestsRunParams["TestpolicyNumberBlock"]);

            //typeof N/A in controller class
            var result = policyNumberActions.RunAPI <bool>(EndPoint, Route, Method, Body);

            Verification(policyNumberActions, result);
        }
示例#10
0
        public void POSTGetProducts_PositiveTest()
        {
            InitializeActions();

            Method = HttpVerbs.Post;
            Route  = "Products";
            //N/A Response
            ExpectedResponseType           = typeof(QuoteViewModel);
            ExpectedResponseHttpStatusCode = HttpStatusCode.OK;

            Entity = "QuoteRequest";

            //quote request creation
            //QuoteRequestJson();
            Body = JSONData.GetEntityFromJSONFile(Entity);

            quoteActions.ClearURLData();


            var result = quoteActions.RunAPI <QuoteViewModel>(EndPoint, Route, Method, Body);

            Verification(quoteActions, result);
        }
示例#11
0
        public LoginResultModel POSTAccountLogin()
        {
            InitializeActions();
            Route  = "Login";
            Method = HttpVerbs.Post;
//            Agent = "Lisa";

            ExpectedResponseType           = typeof(LoginResultModel);
            ExpectedResponseHttpStatusCode = HttpStatusCode.OK;

            Entity = "LiginModel_Lisa";
            Body   = JSONData.GetEntityFromJSONFile(Entity);

            accountActions.ClearURLData();

            #region General Actions
            var loginResult = accountActions.RunAPI <LoginResultModel>(EndPoint, Route, Method, Body);
            #endregion

            Verification(accountActions, loginResult);

            LoginResult = loginResult;
            return(loginResult);
        }