@Test public void buildDefault() throws IOException { PropertiesManager pm = Tools.makePm(testFolder, "timeout=1", "step=5"); Timer t = new Timer(Timer.DEFAULTNAME, pm.timers.get(Timer.DEFAULTNAME)); Assert.assertEquals("bad timeout", 1, t.getTimeout()); Assert.assertEquals("bad step", 5, t.getStep()); }
@Test public void buildOther() throws IOException { PropertiesManager pm = Tools.makePm( testFolder, "timeout=1", "step=5", "timers=slow", "timer.slow.timeout=30", "timer.slow.step=3600"); Timer t = new Timer("slow", pm.timers.get("slow")); Assert.assertEquals("bad timeout", 30, t.getTimeout()); Assert.assertEquals("bad step", 3600, t.getStep()); }