001/* JUnit test the Kieler Layout mechanism.
002
003 Copyright (c) 2011-2018 The Regents of the University of California.
004 All rights reserved.
005 Permission is hereby granted, without written agreement and without
006 license or royalty fees, to use, copy, modify, and distribute this
007 software and its documentation for any purpose, provided that the above
008 copyright notice and the following two paragraphs appear in all copies
009 of this software.
010
011 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
012 FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
013 ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
014 THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
015 SUCH DAMAGE.
016
017 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
018 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
019 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
020 PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
021 CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
022 ENHANCEMENTS, OR MODIFICATIONS.
023
024 PT_COPYRIGHT_VERSION_2
025 COPYRIGHTENDKEY
026
027 */
028
029package ptolemy.vergil.basic.layout.kieler.test.junit;
030
031///////////////////////////////////////////////////////////////////
032//// KielerJUnitTestExtendedModels
033/**
034 * Test out Kieler by open models, using Kieler to layout the graph
035 * and then doing undo and redo.
036 *
037 * <p>This class uses models such as ptolemy/domains/modal/demo/SystemLevelType,
038 * which is not shipped with Cape Code, so these tests are in a
039 * separate file.</p>
040 *
041 * @author Christopher Brooks
042 * @version $Id$
043 * @since Ptolemy II 11.0
044 * @Pt.ProposedRating Red (cxh)
045 * @Pt.AcceptedRating Red (cxh)
046 */
047public class KielerJUnitTestExtendedModels extends KielerJUnitTest {
048
049    /* ----------------------------
050     *          Actor Tests
051     * ---------------------------- */
052
053    /** Test the layout of the CarTracking model.
054     * @exception Exception If there is a problem reading or laying
055     * out a model.
056     */
057    @org.junit.Test
058    public void runCarTracking() throws Exception {
059
060        _layoutTest(
061                "$CLASSPATH/ptolemy/domains/continuous/demo/CarTracking/CarTracking.xml",
062                false);
063    }
064
065    /** Test the layout of the Router model.
066     * @exception Exception If there is a problem reading or laying
067     * out a model.
068     */
069    @org.junit.Test
070    public void runRouter() throws Exception {
071        _layoutTest("$CLASSPATH/ptolemy/demo/ExecDemos/Demos/Router.xml",
072                false);
073    }
074
075    /* ----------------------------
076     *          FSM Tests
077     * ---------------------------- */
078    /** Test the layout of the CSPDomain FSM Model.
079     * @exception Exception If there is a problem reading or laying
080     * out a model.
081     */
082    @org.junit.Test
083    public void runCSPDomain() throws Exception {
084        _layoutTest(
085                "$CLASSPATH/ptolemy/domains/modal/demo/SystemLevelType/CSPDomain.xml",
086                false);
087    }
088
089    /** Test the layout of the Interrupter FSM Model.
090     * @exception Exception If there is a problem reading or laying
091     * out a model.
092     */
093    @org.junit.Test
094    public void runInterrupter() throws Exception {
095        _layoutTest(
096                "$CLASSPATH/ptolemy/domains/modal/demo/SystemLevelType/Interrupter.xml",
097                false);
098    }
099
100    /** Test the layout of the Monitor FSM Model.
101     * @exception Exception If there is a problem reading or laying
102     * out a model.
103     */
104    @org.junit.Test
105    public void runMonitor() throws Exception {
106        _layoutTest(
107                "$CLASSPATH/ptolemy/domains/modal/demo/SystemLevelType/Monitor.xml",
108                false);
109    }
110}