Skip to content
Permalink
Browse files

Pi tests call prefix

  • Loading branch information...
silverailscolo committed May 27, 2019
1 parent 781bd34 commit 4c06733dca351f0fedc712bd500261ae14314d31
@@ -9,6 +9,9 @@
</buildFile>
<buildFile url="file://$PROJECT_DIR$/build.xml">
<customJdkName value="1.8" />
<properties>
<property name="test.includes" value="jmri.jmrix.pi.PackageTest" />

This comment has been minimized.

Copy link
@bobjacobsen

bobjacobsen May 27, 2019

Member

Why should just this package be called out in a global file?

This comment has been minimized.

Copy link
@silverailscolo

silverailscolo May 27, 2019

Author Contributor

My error to see test in commit, was removed in next commit 63d2ce4

</properties>
</buildFile>
</component>
</project>
@@ -9,7 +9,7 @@

/**
* Implementation of XNetPortController that eases
* checking whether data was forwarded or not
* checking whether data was forwarded or not.
*
* @author Bob Jacobsen Copyright (C) 2006, 2015
*/
@@ -7,7 +7,8 @@
import com.pi4j.io.gpio.WiringPiGpioProviderBase;

/**
* Tests for RaspberryPiSensorManager.
* Implementation of RaspberryPiAdapter that eases
* checking whether data was forwarded or not
*
* @author Paul Bender Copyright (C) 2016
*/
@@ -15,7 +15,7 @@
@Test
public void testCTor() {
RaspberryPiConnectionTypeList t = new RaspberryPiConnectionTypeList();
Assert.assertNotNull("exists",t);
Assert.assertNotNull("exists", t);
}

// The minimal setup for log4J
@@ -10,7 +10,7 @@
/**
* Tests for RaspberryPiSensorManager.
* <p>
* This is somehow not reseting the GPIO support, so each reference to a "pin"
* This is somehow not resetting the GPIO support, so each reference to a "pin"
* needs to be do a different one, even across multiple test types.
*
* @author Paul Bender Copyright (C) 2016
@@ -19,7 +19,7 @@

@Override
public String getSystemName(int i) {
return "PIS" + i;
return l.getSystemPrefix() + "S" + i;
}

@Test
@@ -29,7 +29,7 @@ public void ConstructorTest(){

@Test
public void checkPrefix(){
Assert.assertEquals("Prefix","PI",l.getSystemPrefix());
Assert.assertEquals("Prefix", "PI", l.getSystemPrefix());
}

@Override
@@ -96,7 +96,7 @@ public void testMoveUserName() {
@Override
@Test
public void testPullResistanceConfigurable(){
Assert.assertTrue("Pull Resistance Configurable",l.isPullResistanceConfigurable());
Assert.assertTrue("Pull Resistance Configurable", l.isPullResistanceConfigurable());
}

@Override
@@ -123,7 +123,7 @@ public void setUp() {
GpioProvider myprovider = new PiGpioProviderScaffold();
GpioFactory.setDefaultProvider(myprovider);
JUnitUtil.resetInstanceManager();
l = new RaspberryPiSensorManager("Pi");
l = new RaspberryPiSensorManager("PI");
}

@After
@@ -64,7 +64,7 @@ public void testAddListener() throws JmriException {

@Test
public void testGetPullResistance(){
Assert.assertEquals("default pull state",jmri.Sensor.PullResistance.PULL_DOWN,t.getPullResistance());
Assert.assertEquals("default pull state", jmri.Sensor.PullResistance.PULL_DOWN, t.getPullResistance());
}

// The minimal setup for log4J
@@ -20,7 +20,7 @@

@Override
public String getSystemName(int i){
return "PiT"+i;
return l.getSystemPrefix() + "T" + i;
}

@Test
@@ -30,7 +30,7 @@ public void ConstructorTest(){

@Test
public void checkPrefix(){
Assert.assertEquals("Prefix","Pi",l.getSystemPrefix());
Assert.assertEquals("Prefix", "Pi", l.getSystemPrefix());
}

@Override

0 comments on commit 4c06733

Please sign in to comment.
You can’t perform that action at this time.