Package au.edu.mq.comp.junitGrading

Examples of au.edu.mq.comp.junitGrading.CSVFormatter


            {
                Log.message("-> " + testName);
                outputHeader.add(testName);
            }
           
            CSVFormatter dataFormatter = new CSVFormatter(outputHeader);
           
            //start working
            WorkGroup<Assignment, TestResult> workGroup = new WorkGroup<Assignment, TestResult>();
        for(int i = 0; i < config.numberOfWorkers(); i++)
            workGroup.addWorker(this.makeGrader(config));
        this.listOfAssignment = new LinkedList<Assignment>();
        while(true == ca.hasMoreAssignment())
        {
          Assignment assignment = ca.nextAssignment();
          if(null != assignment)
          {
              this.listOfAssignment().add(assignment);
            workGroup.pushWorkData(assignment);
          }
        }

        while(0 < workGroup.currentDataCount())
        {
          TestResult result = workGroup.popWorkResult();
          dataFormatter.addRow(result);
        }
        System.out.println("============D O N E==============");
        return dataFormatter.toString();
        }
        else
        {
           
          throw new Exception("Automark:There is problem with config file");
View Full Code Here


          Assignment assignment = ca.nextAssignment();
          if(null != assignment)
            workGroup.pushWorkData(assignment);
        }

        CSVFormatter dataFormatter = new CSVFormatter();
        //keeping getting the TestResult until done
        while(0 < workGroup.currentDataCount())
        {
          TestResult result = workGroup.popWorkResult();
          dataFormatter.addRow(result);
        }
       
        //write result.csv
        SimpleFileIO.writeStringToTextFile(dataFormatter.toString(), "Result.csv");
     
      // done
      System.out.println("done");
    }
    catch (Exception e)
View Full Code Here

            {
                Log.message("-> " + testName);
                outputHeader.add(testName);
            }
           
            CSVFormatter dataFormatter = new CSVFormatter(outputHeader);
           
            //start working
            WorkGroup<Assignment, TestResult> workGroup = new WorkGroup<Assignment, TestResult>();
        for(int i = 0; i < config.numberOfWorkers(); i++)
            workGroup.addWorker(this.makeGrader(config));
        this.listOfAssignment = new LinkedList<Assignment>();
        while(true == ca.hasMoreAssignment())
        {
          Assignment assignment = ca.nextAssignment();
          if(null != assignment)
          {
              this.listOfAssignment().add(assignment);
            workGroup.pushWorkData(assignment);
          }
        }

        while(0 < workGroup.currentDataCount())
        {
          TestResult result = workGroup.popWorkResult();
          dataFormatter.addRow(result);
        }
        System.out.println("============D O N E==============");
        return dataFormatter.toString();
        }
        else
        {
           
          throw new Exception("Automark:There is problem with config file");
View Full Code Here

          String pathToAutomarkFile = args[0];
          java.io.File automarkFile = SimpleFileIO.makeFileFromPath(pathToAutomarkFile);
          if(true == automarkFile.canRead())
          {
            Automark automark = new Automark();
            String csvOutputString = automark.run(automarkFile, new CSVFormatter());
            if(false == csvOutputString.isEmpty())
            {
              SimpleFileIO.writeStringToTextFile(csvOutputString, "Result.csv");
                Log.message("Wrote output csv file to -->" + "Result.csv");
            }
View Full Code Here

            {
                Log.message("-> " + testName);
                outputHeader.add(testName);
            }
           
            CSVFormatter dataFormatter = new CSVFormatter(outputHeader);
           
            //start working
            WorkGroup<Assignment, TestResult> workGroup = new WorkGroup<Assignment, TestResult>();
        for(int i = 0; i < config.numberOfWorkers(); i++)
            workGroup.addWorker(this.makeGrader(config));
        this.listOfAssignment = new LinkedList<Assignment>();
        while(true == ca.hasMoreAssignment())
        {
          Assignment assignment = ca.nextAssignment();
          if(null != assignment)
          {
              this.listOfAssignment().add(assignment);
            workGroup.pushWorkData(assignment);
          }
        }

        while(0 < workGroup.currentDataCount())
        {
          TestResult result = workGroup.popWorkResult();
          dataFormatter.addRow(result);
        }
        System.out.println("============D O N E==============");
        return dataFormatter.toString();
        }
        else
        {
          return "";
        }
View Full Code Here

            {
                Log.message("-> " + testName);
                outputHeader.add(testName);
            }
           
            CSVFormatter dataFormatter = new CSVFormatter(outputHeader);
           
            //start working
            WorkGroup<Assignment, TestResult> workGroup = new WorkGroup<Assignment, TestResult>();
        for(int i = 0; i < config.numberOfWorkers(); i++)
            workGroup.addWorker(this.makeGrader(config));
       
        while(true == ca.hasMoreAssignment())
        {
          Assignment assignment = ca.nextAssignment();
          if(null != assignment)
            workGroup.pushWorkData(assignment);
        }

        while(0 < workGroup.currentDataCount())
        {
          TestResult result = workGroup.popWorkResult();
          dataFormatter.addRow(result);
        }
       
        return dataFormatter.toString();
        }
        else
        {
          return "";
        }
View Full Code Here

TOP

Related Classes of au.edu.mq.comp.junitGrading.CSVFormatter

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.