Package share

Examples of share.DescEntry


    }

    protected static DescEntry setErrorDescription(DescEntry entry,
                                                   String ErrorMsg) {
        if (entry == null)
            entry = new DescEntry();
        entry.hasErrorMsg = true;
        entry.ErrorMsg = "Error while getting description for test '" +
            fullJob + "' as an API test: " + ErrorMsg;

        return entry;
View Full Code Here


        } else {
            module = aEntry.substring(0, aEntry.lastIndexOf('.'));
            shortName = aEntry.substring(aEntry.lastIndexOf('.') + 1);
        }

        DescEntry theEntry = new DescEntry();
        theEntry.entryName = aEntry;
        theEntry.longName = aEntry;
        theEntry.isOptional = false;
        theEntry.EntryType = "component";
        theEntry.isToTest = true;
View Full Code Here

        } else {
            module = entry.substring(0, entry.lastIndexOf('.'));
            shortName = entry.substring(entry.lastIndexOf('.') + 1);
        }

        DescEntry aEntry = new DescEntry();
        aEntry.entryName = entry;
        aEntry.longName = entry;
        aEntry.isOptional = false;
        aEntry.EntryType = "component";
        aEntry.isToTest = true;
View Full Code Here

                DynamicClassLoader dcl = new DynamicClassLoader();
                LogWriter log = (LogWriter) dcl.getInstance(
                (String) param.get("LogWriter"));
               
                //create empty entry
                DescEntry Entry = new DescEntry();
                Entry.entryName = "office";
                Entry.longName = "office";
                Entry.EntryType = "placebo";
                Entry.isOptional = false;
                Entry.isToTest = false;
View Full Code Here

            DescEntry[] entries = getScenario(entry.substring(5),null,debug);
            return entries;
        }
        // one single job
        else if (entry.startsWith("-o")) {
            DescEntry dEntry = getDescriptionForSingleJob(entry.substring(3), null, debug);
            if (dEntry != null)
                return new DescEntry[] {dEntry};
        }
        System.out.println("Could not get a testjob with parameter '"
                            + entry +"'");
View Full Code Here

        String[] testMethodName = testClass.getTestMethodNames();
        if (methodNames != null) {
            testMethodName = methodNames;
        }
       
        DescEntry dEntry = new DescEntry();
       
        dEntry.entryName = testObjectName;
        dEntry.longName = className;
        dEntry.isOptional = false;
        dEntry.EntryType = "unit";
        dEntry.isToTest = true;
        dEntry.SubEntryCount = testMethodName.length;
        dEntry.SubEntries = new DescEntry[dEntry.SubEntryCount];
        for (int i=0; i<dEntry.SubEntryCount; i++) {
            DescEntry aEntry = new DescEntry();
            aEntry.entryName = testMethodName[i];
            aEntry.longName = testObjectName +"::" + aEntry.entryName;
            aEntry.isOptional = false;
            aEntry.EntryType = "method";
            aEntry.isToTest = true;
View Full Code Here

        boolean objectWasCreated = ((Boolean)tEnv.getObjRelation("objectCreated")).booleanValue();

        if (objectWasCreated) {
            oBasicHandler.setTestedInterface(this, log);

            DescEntry methods[] = xTestedEntry.SubEntries;

            String  names[] = new String[methods.length + 1];
            boolean isOpt[] = new boolean[methods.length + 1];
            String other[] = new String[1];
View Full Code Here

                return null;
            }

            // special in case several Interfaces are given comma separated
            if (job.indexOf(",") < 0) {
                DescEntry entry = getDescriptionForSingleJob(job, descPath,
                                                             debug);

                if (entry != null) {
                    return new DescEntry[] { entry };
                } else {
                    return null;
                }
            } else {
                ArrayList subs = getSubInterfaces(job);
                String partjob = job.substring(0, job.indexOf(",")).trim();
                DescEntry entry = getDescriptionForSingleJob(partjob, descPath,
                                                             debug);

                if (entry != null) {
                    for (int i = 0; i < entry.SubEntryCount; i++) {
                        String subEntry = entry.SubEntries[i].longName;
View Full Code Here

        if (isSingleInterface) {
            job = job.substring(0, job.indexOf("::"));
        }

        if (job.startsWith("bugs")) {
            DescEntry Entry = new DescEntry();
            Entry.entryName = job;
            Entry.longName = job;
            Entry.EntryType = "bugdoc";
            Entry.isOptional = false;
            Entry.isToTest = true;
            Entry.SubEntryCount = 0;
            Entry.hasErrorMsg = false;
            Entry.State = "non possible";

            return Entry;
        }

        DescEntry entry = null;

        if (descPath != null) {
            if (debug) {
                System.out.println("## reading from File " + descPath);
            }
View Full Code Here

                                               DescEntry parent, boolean debug) {
        String line = "";
        String old_ifc_name = "";
        ArrayList ifc_names = new ArrayList();
        ArrayList meth_names = new ArrayList();
        DescEntry ifcDesc = null;
        DescEntry methDesc = null;
        String entryType = "service";

        while (line != null) {
            try {
                line = cvsFile.readLine();

                if ((line != null) && (line.length() > 0)) {
                    String ifc_name = line.substring(line.indexOf(";") + 2,
                                                     line.lastIndexOf(";") - 1);
                    String meth_name = line.substring(line.lastIndexOf(";") + 2,
                                                      line.length() - 1);

                    methDesc = new DescEntry();

                    if (meth_name.indexOf("#optional") > 0) {
                        methDesc.isOptional = true;
                        meth_name = meth_name.substring(0,
                                                        meth_name.indexOf("#"));
                    }

                    if (meth_name.endsWith("()")) {
                        methDesc.EntryType = "method";
                        entryType = "interface";
                    } else {
                        methDesc.EntryType = "property";
                        entryType = "service";
                    }

                    methDesc.entryName = meth_name;
                    methDesc.isToTest = true;

                    String withoutHash = ifc_name;

                    if (ifc_name.indexOf("#optional") > 0) {
                        withoutHash = ifc_name.substring(0,
                                                         ifc_name.indexOf("#"));
                    }

                    methDesc.longName = parent.entryName + "::" +
                                        withoutHash + "::" + meth_name;

                    if (!ifc_name.equals(old_ifc_name)) {
                        if (ifcDesc != null) {
                            ifcDesc.SubEntries = getDescArray(
                                                         meth_names.toArray());
                            ifcDesc.SubEntryCount = meth_names.size();

                            //mark service/interface as optional if all methods/properties are optional
                            boolean allOptional = true;

                            for (int k = 0; k < ifcDesc.SubEntryCount; k++) {
                                if (!ifcDesc.SubEntries[k].isOptional) {
                                    allOptional = false;
                                }
                            }

                            if (!ifcDesc.isOptional && allOptional) {
                                ifcDesc.isOptional = allOptional;
                            }

                            meth_names.clear();
                            ifc_names.add(ifcDesc);
                        }

                        ifcDesc = new DescEntry();
                        ifcDesc.isToTest = true;
                        old_ifc_name = ifc_name;

                        if (ifc_name.indexOf("#optional") > 0) {
                            ifcDesc.isOptional = true;
View Full Code Here

TOP

Related Classes of share.DescEntry

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.