Package share

Examples of share.DescEntry


                final DynamicClassLoader dcl = new DynamicClassLoader();
                final LogWriter log = (LogWriter) dcl.getInstance(
                        (String) param.get("LogWriter"));

                //create empty entry
                final DescEntry Entry = new DescEntry();
                Entry.entryName = "office";
                Entry.longName = "office";
                Entry.EntryType = "placebo";
                Entry.isOptional = false;
                Entry.isToTest = false;
View Full Code Here


                return false;
            }

            param.put("ServiceFactory", msf);

            DescEntry entry = entries[l];

            //get some helper classes
            Summarizer sumIt = new Summarizer();
            DynamicClassLoader dcl = new DynamicClassLoader();
View Full Code Here

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

        if (methodNames != null)
        {
            testMethodNames = methodNames;
        }

        DescEntry dEntry = createTestDesc(testObjectName, className, testMethodNames, null);

        return dEntry;
    }
View Full Code Here

     * @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

        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

                    continue;
                }

//            param.put("ServiceFactory", msf);

                DescEntry entry = entries[l];

                //get some helper classes
                Summarizer sumIt = new Summarizer();

                TestCase tCase = null;

                try
                {
                    tCase = (TestCase) dcl.getInstance("mod._" + entry.entryName);
                }
                catch (java.lang.IllegalArgumentException ie)
                {
                    entry.ErrorMsg = ie.getMessage();
                    entry.hasErrorMsg = true;
                }
                catch (java.lang.NoClassDefFoundError ie)
                {
                    entry.ErrorMsg = ie.getMessage();
                    entry.hasErrorMsg = true;
                }

                if (tCase == null)
                {
                    Summarizer.summarizeDown(entry, entry.ErrorMsg);

                    LogWriter sumObj = OutProducerFactory.createOutProducer(param);
                    entry.UserDefinedParams = param;
                    sumObj.initialize(entry, logging);
                    sumObj.summary(entry);

                    continue;
                }

                if (debug)
                {
                    System.out.println("sleeping 5 seconds..");
                }
                util.utils.shortWait(5000);

                System.out.println("Creating: " + entry.entryName);

                LogWriter log = (LogWriter) dcl.getInstance((String) param.get("LogWriter"));
                log.initialize(entry, logging);
                entry.UserDefinedParams = param;

                TestEnvironment tEnv = null;

                try
                {
                    tCase.setLogWriter((PrintWriter) log);
                    tCase.initializeTestCase(param);
                    tEnv = tCase.getTestEnvironment(param);
                }
                catch (Exception e)
                {
                    System.out.println("Exception while creating " + tCase.getObjectName());
                    System.out.println("Message " + e.getMessage());
                    e.printStackTrace();
                    tEnv = null;
                }
                catch (java.lang.UnsatisfiedLinkError e)
                {
                    System.out.println("Exception while creating " + tCase.getObjectName());
                    System.out.println("Message " + e.getMessage());
                    tEnv = null;
                }
                catch (java.lang.NoClassDefFoundError e)
                {
                    System.out.println("Exception while creating " + tCase.getObjectName());
                    System.out.println("Message " + e.getMessage());
                    tEnv = null;
                }

                if (tEnv == null)
                {
                    Summarizer.summarizeDown(entry, "Couldn't create " + tCase.getObjectName());

                    LogWriter sumObj = OutProducerFactory.createOutProducer(param);
                    entry.UserDefinedParams = param;
                    sumObj.initialize(entry, logging);
                    sumObj.summary(entry);

                    continue;
                }

                System.out.println(tCase.getObjectName() + " recreated ");

                for (int j = 0; j < entry.SubEntryCount; j++)
                {
                    DescEntry aSubEntry = entry.SubEntries[j];
                    if (!aSubEntry.isToTest)
                    {
                        Summarizer.summarizeDown(aSubEntry, "not part of the job");

                        continue;
View Full Code Here

    {
        if (res != null)
        {
            for (int k = 0; k < aSubEntry.SubEntryCount; k++)
            {
                DescEntry aSubSubEntry = aSubEntry.SubEntries[k];
                if (res.hasMethod( aSubSubEntry.entryName))
                {
                    aSubSubEntry.State = res.getStatusFor(aSubSubEntry.entryName).toString();
                }
            }
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

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.