Package org.easetech.easytest._1

Examples of org.easetech.easytest._1.InputTestData


            // File xml = new File(filePath);
            ResourceLoader resource = new ResourceLoader(filePath);
            Document document = db.parse(resource.getInputStream());
            Binder<Node> binder = getJAXBContext().createBinder();
            binder.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
            InputTestData testData = (InputTestData) binder.unmarshal(document);
            updateTestMethods(testData, actualData);
            binder.updateXML(testData);
            TransformerFactory tf = TransformerFactory.newInstance();
            Transformer t = tf.newTransformer();
            t.transform(new DOMSource(document), new StreamResult(resource.getFileOutputStream()));
View Full Code Here


        Map<String, List<Map<String, Object>>> data = new HashMap<String, List<Map<String, Object>>>();
        JAXBContext context = getJAXBContext();
        try {
            if (context != null) {
                Unmarshaller unmarshaller = context.createUnmarshaller();
                InputTestData testData = (InputTestData) unmarshaller.unmarshal(xmlFile);
                convertFromInputTestData(testData, data);
            }
        } catch (JAXBException e) {
            LOG.error("JAXBException occured while trying to unmarshal the data.", e);
            throw new RuntimeException("JAXBException occured while trying to unmarshal the data.", e);
View Full Code Here

            dbf.setNamespaceAware(true);
            DocumentBuilder db = dbf.newDocumentBuilder();
            Document document = db.parse(resource.getInputStream());
            Binder<Node> binder = getJAXBContext().createBinder(Node.class);
            binder.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
            InputTestData testData = (InputTestData) binder.unmarshal(document);
            if(methodNames == null || methodNames.length == 0){
                updateTestMethods(testData, null, actualData);
            }else{
                for(String methodName : methodNames){
                    updateTestMethods(testData, methodName, actualData);
View Full Code Here

                    // Find the right place to put the data.
                    for (TestMethod testMethod : inputTestData.getTestMethod()) {
                        List<TestRecord> originalTestRecords = testMethod.getTestRecord();
                        for (TestRecord originalTestRecord : originalTestRecords) {
                            if (originalTestRecord.getId().equals(testRecord.get(RECORD_POSITION))) {
                                OutputData outputData = new OutputData();
                                Entry outputEntry = new Entry();
                                outputEntry.setKey(ACTUAL_RESULT);
                                outputEntry.setValue(testRecord.get(ACTUAL_RESULT).toString());
                                outputData.getEntry().add(outputEntry);
                                originalTestRecord.setOutputData(outputData);
                                outputDataAdded = true;
                                break;
                            }
                        }
View Full Code Here

                    // Find the right place to put the data.
                    for (TestMethod testMethod : inputTestData.getTestMethod()) {
                        List<TestRecord> originalTestRecords = testMethod.getTestRecord();
                        for (TestRecord originalTestRecord : originalTestRecords) {
                            if (originalTestRecord.getId().equals(testRecord.get(RECORD_POSITION))) {
                                OutputData outputData = new OutputData();
                                Entry outputEntry = new Entry();
                                outputEntry.setKey(ACTUAL_RESULT);
                                outputEntry.setValue(testRecord.get(ACTUAL_RESULT).toString());
                                Entry durationEntry = new Entry();
                                durationEntry.setKey(DURATION);
                                durationEntry.setValue(testRecord.get(DURATION).toString());
                                outputData.getEntry().add(outputEntry);
                                outputData.getEntry().add(durationEntry);
                                if(testRecord.get(TEST_STATUS) != null){
                                    Entry statusEntry = new Entry();
                                    statusEntry.setKey(TEST_STATUS);
                                    statusEntry.setValue(testRecord.get(TEST_STATUS).toString());
                                    outputData.getEntry().add(statusEntry);
                                }
                               
                               
                                originalTestRecord.setOutputData(outputData);
                                outputDataAdded = true;
                                break;
                            }
                        }
                        if (outputDataAdded) {
                            break;
                        }
                    }
                }else{
                    //Method did not return any data. So only write the duration as output
                    for (TestMethod testMethod : inputTestData.getTestMethod()) {
                        List<TestRecord> originalTestRecords = testMethod.getTestRecord();
                        for (TestRecord originalTestRecord : originalTestRecords) {
                            if (originalTestRecord.getId().equals(testRecord.get(RECORD_POSITION))) {
                                OutputData outputData = new OutputData();
                                Entry durationEntry = new Entry();
                                durationEntry.setKey(DURATION);
                                durationEntry.setValue(testRecord.get(DURATION).toString());
                                outputData.getEntry().add(durationEntry);
                                originalTestRecord.setOutputData(outputData);
                                outputDataAdded = true;
                                break;
                            }
                        }
View Full Code Here

        DepAcctTrnInqRs_Type response = _1Factory.INSTANCE.createDepAcctTrnInqRs_Type();

        response.setStatus(_1Factory.INSTANCE.createStatus_Type());
        response.getStatus().setStatusCode(1);
        response.getStatus().setStatusDesc("the description associated with the code 1");
        AdditionalStatus_Type addStatus = _1Factory.INSTANCE.createAdditionalStatus_Type();
        addStatus.setServerStatusCode("STATUS_OK");
        addStatus.setSeverity("SEVERITY_WARNING");
        response.getStatus().getAdditionalStatus().add(addStatus);

        response.setDepAcctId(_1Factory.INSTANCE.createDepAcctId_Type());
        response.getDepAcctId().setBankInfo(_1Factory.INSTANCE.createBankInfo_Type());
        response.getDepAcctId().getBankInfo().setBranchId("Concord_1");
View Full Code Here

        DepAcctTrnInqRs_Type response = _1Factory.INSTANCE.createDepAcctTrnInqRs_Type();

        response.setStatus(_1Factory.INSTANCE.createStatus_Type());
        response.getStatus().setStatusCode(1);
        response.getStatus().setStatusDesc("the description associated with the code 1");
        AdditionalStatus_Type addStatus = _1Factory.INSTANCE.createAdditionalStatus_Type();
        addStatus.setServerStatusCode("STATUS_OK");
        addStatus.setSeverity("SEVERITY_WARNING");
        response.getStatus().getAdditionalStatus().add(addStatus);

        response.setDepAcctId(_1Factory.INSTANCE.createDepAcctId_Type());
        response.getDepAcctId().setBankInfo(_1Factory.INSTANCE.createBankInfo_Type());
        response.getDepAcctId().getBankInfo().setBranchId("Concord_1");
View Full Code Here

        response.getDepAcctId().getBankInfo().setStateProv("ON");

        List records = response.getDepAcctTrnRec();
        // Record1
        DepAcctTrnRec_Type trnRec1 = null;
        BankAcctTrnRec_Type baTrnRec1 = null;
        long maxRec = req.getTrnCountLimit().getCount();
        for (int i = 0; i < maxRec; i++) {
            trnRec1 = _1Factory.INSTANCE.createDepAcctTrnRec_Type();
            baTrnRec1 = _1Factory.INSTANCE.createBankAcctTrnRec_Type();
View Full Code Here

        response.getDepAcctId().getBankInfo().setStateProv("ON");

        List records = response.getDepAcctTrnRec();
        // Record1
        DepAcctTrnRec_Type trnRec1 = null;
        BankAcctTrnRec_Type baTrnRec1 = null;
        long maxRec = req.getTrnCountLimit().getCount();
        for (int i = 0; i < maxRec; i++) {
            trnRec1 = _1Factory.INSTANCE.createDepAcctTrnRec_Type();
            baTrnRec1 = _1Factory.INSTANCE.createBankAcctTrnRec_Type();
View Full Code Here

            trnRec1.getBankAcctTrnRec().getCustPayeeInfo().setBillerPayee(_1Factory.INSTANCE.createBillerPayee_Type());
            BillerPayee_Type BillerP = trnRec1.getBankAcctTrnRec().getCustPayeeInfo().getBillerPayee();

            BillerP.setBillerId(_1Factory.INSTANCE.createBillerId_Type());
            BillerId_Type BId = BillerP.getBillerId();

            BId.setBillerNum("123");
            BId.setSPName("SomeName");

            trnRec1.setAvailDt("sss");
            trnRec1.setPmtId("SomeID");
            trnRec1.setXferId("SomeOtherID");
View Full Code Here

TOP

Related Classes of org.easetech.easytest._1.InputTestData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.