Skip to content

Commit

Permalink
test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
bobjacobsen committed Apr 11, 2018
1 parent 39c3fb8 commit 7efbbba
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions java/test/jmri/implementation/DefaultClockControlTest.java
Expand Up @@ -17,6 +17,25 @@ public void testCTor() {
Assert.assertNotNull("exists",t);
}

@Test
public void testGetSet() {
DefaultClockControl t = new DefaultClockControl();

t.setRate(2.0); // doesn't do anything
Assert.assertEquals(1.0, t.getRate(), 0.01);

t.setTime(null); // doesn't do anything
t.getTime();

Assert.assertEquals(0, t.getStatus());

Assert.assertEquals(null, t.getHardwareClockName());

Assert.assertTrue(! t.canCorrectHardwareClock());
Assert.assertTrue(! t.canSet12Or24HourClock());

}

// The minimal setup for log4J
@Before
public void setUp() {
Expand Down

0 comments on commit 7efbbba

Please sign in to comment.