Exemplo n.º 1
0
        public void step_02()
        {
            Logger.PrintStepName("Step 2");
            SubscriberService.SubscriberInterface si             = new SubscriberInterfaceClient();
            SubscriberService.replaceSIMRequest   replaceRequest = new replaceSIMRequest();
            replaceRequest.ctn   = ctn;
            replaceRequest.token = token;
            newSim =
                Executor.ExecuteSelect("select serial_no from serial_item_inv@" + db_Ans +
                                       " where primary_ctn is null and ngp=1 and resource_status='AA'")[0, 0];
            replaceRequest.serialNumber = newSim;

            try
            {
                Logger.PrintAction("Замена сим 105 AT", "");
                SubscriberService.replaceSIMResponse requestResponse = si.replaceSIM(replaceRequest);
                long s = requestResponse.@return;
                Logger.PrintAction("Заявка на замену сим создана", s.ToString());
            }
            catch (FaultException <UssWsApiException> exception)
            {
                Logger.PrintRezult(false, exception.Detail.errorCode + exception.Detail.errorDescription);
            }
            catch (Exception ex)
            {
                Assertion("Ошибка при замене сим: " + ex.Message, Assert.Fail);
            }
        }
Exemplo n.º 2
0
        public void step_04()
        {
            Logger.PrintStepName("Step 4");
            SubscriberService.SubscriberInterface si             = new SubscriberInterfaceClient();
            SubscriberService.replaceSIMRequest   replaceRequest = new replaceSIMRequest();
            SubscriberService.suspendCTNRequest   suspendRequest = new suspendCTNRequest();
            SubscriberService.restoreCTNRequest   restoreRequest = new restoreCTNRequest();


            replaceRequest.ctn   = ctn;
            replaceRequest.token = token;
            newSim =
                Executor.ExecuteSelect("select serial_no from serial_item_inv@" + db_Ans +
                                       " where primary_ctn is null and ngp=1 and resource_status='AA'")[2, 0];
            replaceRequest.serialNumber = newSim;

            suspendRequest.ctn        = ctn;
            suspendRequest.reasonCode = "WIB";
            suspendRequest.token      = token;
            suspendRequest.actvDate   = lockdatenow;

            restoreRequest.ctn        = ctn;
            restoreRequest.reasonCode = "RSBO";
            restoreRequest.token      = token;
            restoreRequest.actvDate   = lockdatenow;
            try
            {
                Logger.PrintAction("Замена сим 105 AT", "");
                SubscriberService.suspendCTNResponse suspendCtnResponse = si.suspendCTN(suspendRequest);
                Thread.Sleep(15000);
                Logger.PrintAction("Заблокирован WIB ", [email protected]());
                SubscriberService.replaceSIMResponse requestResponse = si.replaceSIM(replaceRequest);
                long s = requestResponse.@return;
                Logger.PrintAction("Заявка на замену сим создана", s.ToString());
                Logger.PrintRezult(true, "");

                SubscriberService.restoreCTNResponse restoreResponse = si.restoreCTN(restoreRequest);
                Logger.PrintAction("Разблокировка", [email protected]());
                Thread.Sleep(15000);
            }
            catch (FaultException <UssWsApiException> exception)
            {
                Logger.PrintRezult(false, exception.Detail.errorCode + exception.Detail.errorDescription);
            }
            catch (Exception ex)
            {
                Assertion("Ошибка при замене сим: " + ex.Message, Assert.Fail);
            }
        }