Exemplo n.º 1
0
        public void CustomerStatementTest_Execution_Failure()
        {
            string            wsUrl      = "http://mxoccsapeip01.noam.cemexnet.com:8180/XISOAPAdapter/MessageServlet?senderParty=&senderService=BS_SINCO_PRD_GBL&receiverParty=&receiverService=&interface=SI_OS_CustomerStatement&interfaceNamespace=http%3A%2F%2Fcemex.com%2FSINCO%2FECCMEX%2FCustomerStatement"; // TODO: Initialize to an appropriate value
            CustomerStatement target     = new CustomerStatement(wsUrl);                                                                                                                                                                                                                                            // TODO: Initialize to an appropriate value
            CsParametersDto   parameters = new CsParametersDto()
            {
                IdBusinessEntity = "",
                CDist            = "00",
                IdSOrg           = "7460",
                IdSector         = "03",
                IdDCurr          = "",
                IdFCurr          = ""
            }; // TODO: Initialize to an appropriate value

            var actual = CustomerStatementTest_LogicExec(wsUrl, "WSPISINCO", "inicio01", parameters);

            Assert.IsTrue(actual.Exception != null, actual.Exception);
        }
Exemplo n.º 2
0
        public void CustomerStatementTest_Execution_Failure_Mock()
        {
            string            wsUrl      = "http://10.0.1.7:8080/mockSI_OS_CustomerStatementBinding_Failure"; // TODO: Initialize to an appropriate value
            CustomerStatement target     = new CustomerStatement(wsUrl);                                      // TODO: Initialize to an appropriate value
            CsParametersDto   parameters = new CsParametersDto()
            {
                IdBusinessEntity = "65603243",
                CDist            = "00",
                IdSOrg           = "7460",
                IdSector         = "03",
                IdDCurr          = "",
                IdFCurr          = ""
            }; // TODO: Initialize to an appropriate value

            var actual   = CustomerStatementTest_LogicExec(wsUrl, "WSPISINCO", "inicio01", parameters);
            var expected = new CsResponseDto()
            {
                Exception = "SHIPTO_NOT_FOUND"
            };

            //Assert.IsTrue(actual.Exception != null);
            Assert.AreEqual(actual.Exception, expected.Exception, "(Actual)" + actual.Exception + "=" + "(Expected)" + expected.Exception);
        }
Exemplo n.º 3
0
        public void CustomerStatementTest_Execution_Regular_Mock()
        {
            string            wsUrl      = "http://10.0.1.7:8088/mockSI_OS_CustomerStatementBinding"; // TODO: Initialize to an appropriate value
            CustomerStatement target     = new CustomerStatement(wsUrl);                              // TODO: Initialize to an appropriate value
            CsParametersDto   parameters = new CsParametersDto()
            {
                IdBusinessEntity = "65603243",
                CDist            = "00",
                IdSOrg           = "7460",
                IdSector         = "03",
                IdDCurr          = "",
                IdFCurr          = ""
            }; // TODO: Initialize to an appropriate value

            var actual   = CustomerStatementTest_LogicExec(wsUrl, "WSPISINCO", "inicio01", parameters);
            var expected = new CsResponseDto()
            {
                NBusinessEntity     = "MESA DE YEGUAS V 70",
                IdBlqBusinessEntity = "00",
                NBlqBusinessEntity  = "Not blocked customer",
                IdCliente           = "0050301790",
                NCliente            = "JOSOA SAS",
                IdBlqCliente        = "00",
                NBlqCliente         = "Not blocked customer",
                IdCpObra            = "ZCOC",
                NCpObra             = "(AR) Payable immediately Due net",
                CartT     = "0.0000",
                SldAf     = "1502051.0000-",
                CartN     = "1502051.0000-",
                LimCr     = "0.0000",
                FConvCurr = "42.00",
                VComp     = "0.0000",
                Exception = null
            };

            Assert.IsTrue(expected.NBusinessEntity == actual.NBusinessEntity, "(Expected)" + expected.NBusinessEntity + "=" + "(Actual)" + actual.NBusinessEntity);
        }
Exemplo n.º 4
0
        public CsResponseDto CustomerStatementTest_LogicExec(string wsUrl, string usr, string password, CsParametersDto param)
        {
            //CustomerStatement target = new CustomerStatement(wsUrl);
            IWService <CsParametersDto, CsResponseDto> target = new CustomerStatement(wsUrl);

            target.RequestParameters(param);
            target.Credentials(usr, password);
            return(target.Execute());
        }