Class ExportModelJUnitTestBatch

  • Direct Known Subclasses:
    ExportModelJUnitTestBatch1, ExportModelJUnitTestBatch2, ExportModelJUnitTestBatch3, ExportModelJUnitTestBatch4, ExportModelJUnitTestBatch5, ExportModelJUnitTestBatch6, ExportModelJUnitTestBatch7

    public class ExportModelJUnitTestBatch
    extends ExportModelJUnitTest
    JUnit test that exports the demos between two indices. Derived classes should override the demos() method and invoke super.demos(N,M);, where N and M are the start and end indices of the models to be exported.

    To run the first batch of models using the baseclass:

     cd $PTII
     ./configure
     ant test.single -Dtest.name=ptolemy.vergil.basic.export.test.junit.ExportModelJUnitTestBatch -Djunit.formatter=plain
     
    or
     cd $PTII/ptolemy/vergil/basic/export/test/junit/;
     export CLASSPATH=${PTII}:${PTII}/lib/junit-4.8.2.jar:${PTII}/lib/JUnitParams-0.3.0.jar${PTII}:${PTII}/lib/junit-4.8.2.jar:${PTII}/lib/JUnitParams-0.3.0.jar;
     export JAVAFLAGS="-Dptolemy.ptII.exportHTML.linkToJNLP=true -Dptolemy.ptII.exportHTML.usePtWebsite=true"
     $PTII/bin/ptinvoke org.junit.runner.JUnitCore ptolemy.vergil.basic.export.test.junit.ExportModelJUnitTestBatch
     

    This test uses JUnitParams from , which is released under Apache License 2.0.

    Since:
    Ptolemy II 11.0
    Version:
    $Id$
    Author:
    Christopher Brooks
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Green (cxh)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object[] demos()
      Return a two dimensional array of arrays of strings that name the first 51 models to be exported.
      java.lang.Object[] demos​(int start, int end)
      Return a two dimensional array of strings that name the models to to be exported.
      void RunExportModel​(java.lang.String modelPath)
      Export a model.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExportModelJUnitTestBatch

        public ExportModelJUnitTestBatch()
    • Method Detail

      • RunExportModel

        public void RunExportModel​(java.lang.String modelPath)
                            throws java.lang.Throwable
        Export a model.
        Overrides:
        RunExportModel in class ExportModelJUnitTest
        Parameters:
        modelPath - The model to be exported. The code is exported to the directory contained by the model.
        Throws:
        java.lang.Throwable - If there is a problem reading or exporting the model.
      • demos

        public java.lang.Object[] demos()
                                 throws java.io.IOException
        Return a two dimensional array of arrays of strings that name the first 51 models to be exported. Derived classes should override this method with the range of demos to be exported.
        Overrides:
        demos in class ExportModelJUnitTest
        Returns:
        a two dimension array of arrays of strings that name the models to be exported.
        Throws:
        java.io.IOException - If there is a problem accessing the directory.
      • demos

        public java.lang.Object[] demos​(int start,
                                        int end)
                                 throws java.io.IOException
        Return a two dimensional array of strings that name the models to to be exported.
        Parameters:
        start - The 0-based index of the first model in $PTII/ptolemy/configs/doc/models.txt
        end - The index of the last model.
        Returns:
        a two dimension array of arrays of strings that name the models to be exported.
        Throws:
        java.io.IOException - If there is a problem accessing the directory.