Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
84b0786
commit 9b0da1b
Showing
8 changed files
with
309 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
java/test/jmri/jmrit/display/layoutEditor/configurexml/LayoutDoubleSlipXmlTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package jmri.jmrit.display.layoutEditor.configurexml; | ||
|
||
import jmri.util.JUnitUtil; | ||
import org.junit.After; | ||
import org.junit.Assert; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
/** | ||
* LayoutSlipXmlTest.java | ||
* | ||
* Test for the LayoutSlipXml class | ||
* | ||
* @author George Warner Copyright (C) 2017 | ||
*/ | ||
public class LayoutDoubleSlipXmlTest { | ||
|
||
@Test | ||
public void testCtor(){ | ||
Assert.assertNotNull("LayoutSlipXml constructor", new LayoutDoubleSlipXml()); | ||
} | ||
|
||
@Before | ||
public void setUp() { | ||
JUnitUtil.setUp(); | ||
} | ||
|
||
@After | ||
public void tearDown() { | ||
JUnitUtil.tearDown(); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
java/test/jmri/jmrit/display/layoutEditor/configurexml/LayoutDoubleXOverXmlTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package jmri.jmrit.display.layoutEditor.configurexml; | ||
|
||
import jmri.jmrit.display.layoutEditor.LayoutTurnout; | ||
import jmri.util.JUnitUtil; | ||
|
||
import org.junit.After; | ||
import org.junit.Assert; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
/** | ||
* LayoutTurnoutXmlTest.java | ||
* | ||
* Test for the LayoutTurnoutXml class | ||
* | ||
* @author Paul Bender Copyright (C) 2016 | ||
*/ | ||
public class LayoutDoubleXOverXmlTest { | ||
|
||
@Test | ||
public void testCtor(){ | ||
Assert.assertNotNull("LayoutTurnoutXml constructor",new LayoutDoubleXOverXmlTest()); | ||
} | ||
|
||
@Before | ||
public void setUp() { | ||
JUnitUtil.setUp(); | ||
} | ||
|
||
@After | ||
public void tearDown() { | ||
JUnitUtil.tearDown(); | ||
} | ||
} | ||
|
35 changes: 35 additions & 0 deletions
35
java/test/jmri/jmrit/display/layoutEditor/configurexml/LayoutLHTurnoutXmlTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package jmri.jmrit.display.layoutEditor.configurexml; | ||
|
||
import jmri.jmrit.display.layoutEditor.LayoutTurnout; | ||
import jmri.util.JUnitUtil; | ||
|
||
import org.junit.After; | ||
import org.junit.Assert; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
/** | ||
* LayoutTurnoutXmlTest.java | ||
* | ||
* Test for the LayoutTurnoutXml class | ||
* | ||
* @author Paul Bender Copyright (C) 2016 | ||
*/ | ||
public class LayoutLHTurnoutXmlTest { | ||
|
||
@Test | ||
public void testCtor(){ | ||
Assert.assertNotNull("LayoutTurnoutXml constructor",new LayoutLHTurnoutXml()); | ||
} | ||
|
||
@Before | ||
public void setUp() { | ||
JUnitUtil.setUp(); | ||
} | ||
|
||
@After | ||
public void tearDown() { | ||
JUnitUtil.tearDown(); | ||
} | ||
} | ||
|
35 changes: 35 additions & 0 deletions
35
java/test/jmri/jmrit/display/layoutEditor/configurexml/LayoutLHXOverXmlTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package jmri.jmrit.display.layoutEditor.configurexml; | ||
|
||
import jmri.jmrit.display.layoutEditor.LayoutTurnout; | ||
import jmri.util.JUnitUtil; | ||
|
||
import org.junit.After; | ||
import org.junit.Assert; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
/** | ||
* LayoutTurnoutXmlTest.java | ||
* | ||
* Test for the LayoutTurnoutXml class | ||
* | ||
* @author Paul Bender Copyright (C) 2016 | ||
*/ | ||
public class LayoutLHXOverXmlTest { | ||
|
||
@Test | ||
public void testCtor(){ | ||
Assert.assertNotNull("LayoutTurnoutXml constructor",new LayoutLHXOverXmlTest()); | ||
} | ||
|
||
@Before | ||
public void setUp() { | ||
JUnitUtil.setUp(); | ||
} | ||
|
||
@After | ||
public void tearDown() { | ||
JUnitUtil.tearDown(); | ||
} | ||
} | ||
|
35 changes: 35 additions & 0 deletions
35
java/test/jmri/jmrit/display/layoutEditor/configurexml/LayoutRHTurnoutXmlTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package jmri.jmrit.display.layoutEditor.configurexml; | ||
|
||
import jmri.jmrit.display.layoutEditor.LayoutTurnout; | ||
import jmri.util.JUnitUtil; | ||
|
||
import org.junit.After; | ||
import org.junit.Assert; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
/** | ||
* LayoutTurnoutXmlTest.java | ||
* | ||
* Test for the LayoutTurnoutXml class | ||
* | ||
* @author Paul Bender Copyright (C) 2016 | ||
*/ | ||
public class LayoutRHTurnoutXmlTest { | ||
|
||
@Test | ||
public void testCtor(){ | ||
Assert.assertNotNull("LayoutTurnoutXml constructor",new LayoutRHTurnoutXml()); | ||
} | ||
|
||
@Before | ||
public void setUp() { | ||
JUnitUtil.setUp(); | ||
} | ||
|
||
@After | ||
public void tearDown() { | ||
JUnitUtil.tearDown(); | ||
} | ||
} | ||
|
70 changes: 70 additions & 0 deletions
70
java/test/jmri/jmrit/display/layoutEditor/configurexml/LayoutRHXOverXmlTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package jmri.jmrit.display.layoutEditor.configurexml; | ||
|
||
import jmri.jmrit.display.layoutEditor.LayoutTurnout; | ||
import jmri.util.JUnitUtil; | ||
|
||
import org.junit.After; | ||
import org.junit.Assert; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
/** | ||
* LayoutTurnoutXmlTest.java | ||
* | ||
* Test for the LayoutTurnoutXml class | ||
* | ||
* @author Paul Bender Copyright (C) 2016 | ||
*/ | ||
public class LayoutRHXOverXmlTest { | ||
|
||
@Test | ||
public void testCtor(){ | ||
Assert.assertNotNull("LayoutTurnoutXml constructor",new LayoutRHXOverXmlTest()); | ||
} | ||
|
||
@Test | ||
public void testFromEnum() { | ||
LayoutTurnoutXml.EnumIO<LayoutTurnout.LinkType> enumMap = LayoutTurnoutXml.linkEnumMap; | ||
LayoutTurnoutXml.EnumIO<LayoutTurnout.TurnoutType> tTypeEnumMap = LayoutTurnoutXml.tTypeEnumMap; | ||
|
||
Assert.assertEquals("NO_LINK", enumMap.outputFromEnum(LayoutTurnout.LinkType.NO_LINK)); | ||
Assert.assertEquals("SECOND_3_WAY", enumMap.outputFromEnum(LayoutTurnout.LinkType.SECOND_3_WAY)); | ||
|
||
Assert.assertEquals("NONE", tTypeEnumMap.outputFromEnum(LayoutTurnout.TurnoutType.NONE)); | ||
Assert.assertEquals("WYE_TURNOUT", tTypeEnumMap.outputFromEnum(LayoutTurnout.TurnoutType.WYE_TURNOUT)); | ||
|
||
} | ||
|
||
@Test | ||
public void testToEnum() { | ||
LayoutTurnoutXml.EnumIO<LayoutTurnout.LinkType> enumMap = LayoutTurnoutXml.linkEnumMap; | ||
LayoutTurnoutXml.EnumIO<LayoutTurnout.TurnoutType> tTypeEnumMap = LayoutTurnoutXml.tTypeEnumMap; | ||
|
||
Assert.assertEquals(LayoutTurnout.LinkType.NO_LINK, enumMap.inputFromString("NO_LINK")); | ||
Assert.assertEquals(LayoutTurnout.LinkType.NO_LINK, enumMap.inputFromString("0")); | ||
|
||
Assert.assertEquals(LayoutTurnout.LinkType.SECOND_3_WAY, enumMap.inputFromString("SECOND_3_WAY")); | ||
Assert.assertEquals(LayoutTurnout.LinkType.SECOND_3_WAY, enumMap.inputFromString("2")); | ||
|
||
Assert.assertEquals(LayoutTurnout.TurnoutType.NONE, tTypeEnumMap.inputFromString("NONE")); | ||
Assert.assertEquals(LayoutTurnout.TurnoutType.NONE, tTypeEnumMap.inputFromString("0")); | ||
|
||
Assert.assertEquals(LayoutTurnout.TurnoutType.WYE_TURNOUT, tTypeEnumMap.inputFromString("WYE_TURNOUT")); | ||
Assert.assertEquals(LayoutTurnout.TurnoutType.WYE_TURNOUT, tTypeEnumMap.inputFromString("3")); | ||
|
||
// Assert.assertEquals(null, enumMap.inputFromString("21")); | ||
// Assert.assertEquals(null, enumMap.inputFromString("A")); | ||
// Assert.assertEquals(null, enumMap.inputFromString("")); | ||
} | ||
|
||
@Before | ||
public void setUp() { | ||
JUnitUtil.setUp(); | ||
} | ||
|
||
@After | ||
public void tearDown() { | ||
JUnitUtil.tearDown(); | ||
} | ||
} | ||
|
32 changes: 32 additions & 0 deletions
32
java/test/jmri/jmrit/display/layoutEditor/configurexml/LayoutSingleSlipXmlTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package jmri.jmrit.display.layoutEditor.configurexml; | ||
|
||
import jmri.util.JUnitUtil; | ||
import org.junit.After; | ||
import org.junit.Assert; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
/** | ||
* LayoutSlipXmlTest.java | ||
* | ||
* Test for the LayoutSlipXml class | ||
* | ||
* @author George Warner Copyright (C) 2017 | ||
*/ | ||
public class LayoutSingleSlipXmlTest { | ||
|
||
@Test | ||
public void testCtor(){ | ||
Assert.assertNotNull("LayoutSlipXml constructor", new LayoutSingleSlipXml()); | ||
} | ||
|
||
@Before | ||
public void setUp() { | ||
JUnitUtil.setUp(); | ||
} | ||
|
||
@After | ||
public void tearDown() { | ||
JUnitUtil.tearDown(); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
java/test/jmri/jmrit/display/layoutEditor/configurexml/LayoutWyeXmlTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package jmri.jmrit.display.layoutEditor.configurexml; | ||
|
||
import jmri.jmrit.display.layoutEditor.LayoutTurnout; | ||
import jmri.util.JUnitUtil; | ||
|
||
import org.junit.After; | ||
import org.junit.Assert; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
/** | ||
* LayoutTurnoutXmlTest.java | ||
* | ||
* Test for the LayoutTurnoutXml class | ||
* | ||
* @author Paul Bender Copyright (C) 2016 | ||
*/ | ||
public class LayoutWyeXmlTest { | ||
|
||
@Test | ||
public void testCtor(){ | ||
Assert.assertNotNull("LayoutTurnoutXml constructor",new LayoutWyeXmlTest()); | ||
} | ||
|
||
@Before | ||
public void setUp() { | ||
JUnitUtil.setUp(); | ||
} | ||
|
||
@After | ||
public void tearDown() { | ||
JUnitUtil.tearDown(); | ||
} | ||
} | ||
|