Package share

Examples of share.DescEntry


     * @return filled description entry
     */
    public DescEntry createTestDesc(String testObjectName, String className, String[] testMethodNames, LogWriter log)
    {

        DescEntry dEntry = new DescEntry();

        dEntry.entryName = testObjectName;
        dEntry.longName = className;
        dEntry.isOptional = false;
        dEntry.EntryType = "unit";
        dEntry.isToTest = true;
        dEntry.Logger = log;
        dEntry.SubEntryCount = testMethodNames.length;
        dEntry.SubEntries = new DescEntry[dEntry.SubEntryCount];
        for (int i = 0; i < dEntry.SubEntryCount; i++)
        {
            DescEntry aEntry = new DescEntry();
            aEntry.entryName = testMethodNames[i];
            aEntry.longName = testObjectName + "::" + aEntry.entryName;
            aEntry.isOptional = false;
            aEntry.EntryType = "method";
            aEntry.isToTest = true;
View Full Code Here


        }

        // executing methods tests
        for (int i = 0; i < entry.SubEntryCount; i++)
        {
            DescEntry aSubEntry = entry.SubEntries[i];
            try
            {
                final String sEntryName = aSubEntry.entryName;
                executeMethod(sEntryName);
            }
View Full Code Here

            }

            // 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++)
View Full Code Here

            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)
            {
View Full Code Here

    {
        String line = "";
        String old_ifc_name = "";
        ArrayList ifc_names = new ArrayList();
        ArrayList meth_names = new ArrayList();
        DescEntry ifcDesc = null;

        while (line != null)
        {
            try
            {
                line = cvsFile.readLine();
                if (line == null)
                {
                    continue;
                }
                if (line.startsWith("#"))
                {
                    continue;
                }
                if (line.length() <= 0)
                {
                    continue;
                }
// TODO Probleme here
                // int nFirstSemicolon = line.indexOf(";");
                // int nLastSemicolon = line.lastIndexOf(";");

                String unknown;
                String ifc_name = ""; //  = line.substring(line.indexOf(";") + 2, line.lastIndexOf(";") - 1);
                String meth_name = ""; //  = line.substring(line.lastIndexOf(";") + 2, line.length() - 1);
                StringTokenizer aToken = new StringTokenizer(line, ";");
                if (aToken.countTokens() < 3)
                {
                    System.out.println("Wrong format: Line '" + line + "' is not supported.");
                    continue;
                }
                if (aToken.hasMoreTokens())
                {
                    unknown = StringHelper.removeQuoteIfExists(aToken.nextToken());
                }
                if (aToken.hasMoreTokens())
                {
                    ifc_name = StringHelper.removeQuoteIfExists(aToken.nextToken());
                }
                if (aToken.hasMoreTokens())
                {
                    meth_name = StringHelper.removeQuoteIfExists(aToken.nextToken());
                }

                // String ifc_name = line.substring(line.indexOf(";") + 2, line.lastIndexOf(";") - 1);
                // String meth_name = line.substring(line.lastIndexOf(";") + 2, line.length() - 1);

                DescEntry methDesc = createDescEntry(meth_name, ifc_name, parent);

                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)
                    {
View Full Code Here

    private static String entryType;

    private static DescEntry createDescEntry(String meth_name, String ifc_name, DescEntry parent)
    {
        entryType = "service";
        DescEntry methDesc = new DescEntry();

        if (meth_name.indexOf("#optional") > 0)
        {
            methDesc.isOptional = true;
            meth_name = meth_name.substring(0, meth_name.indexOf("#"));
View Full Code Here

        ArrayList returnArray = new ArrayList();
        Object addAtEnd = null;

        for (int k = 0; k < entriesArray.length; k++)
        {
            DescEntry entry = (DescEntry) entriesArray[k];

            if (entry.entryName.equals("ifc.lang._XComponent"))
            {
                addAtEnd = entry;
            }
View Full Code Here

    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;
View Full Code Here

        {
            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

        {
            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

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.