paths.reset();
EasyMock.expectLastCall();
paths.verify();
EasyMock.expectLastCall().andReturn(Boolean.TRUE).anyTimes();
final InstallerInterface installer = EasyMock.createNiceMock(InstallerInterface.class);
installer.getPaths();
EasyMock.expectLastCall().andReturn(paths).anyTimes();
installer.reset();
EasyMock.expectLastCall();
installer.getStatus();
EasyMock.expectLastCall().andReturn(Status.NONE);
installer.getStatus();
EasyMock.expectLastCall().andReturn(Status.NONE);
installer.getStatus();
EasyMock.expectLastCall().andReturn(Status.REBOOT_REQUIRED);
installer.getAlerts();
EasyMock.expectLastCall().andReturn(new Alerts()).anyTimes();
final Runner runner = new Runner(installer);
EasyMock.replay(paths, installer);
Assert.assertEquals("NONE", getValue("status", runner.execute(false)));
Assert.assertEquals("NONE", getValue("status", runner.execute(false)));
Assert.assertEquals("REBOOT_REQUIRED", getValue("status", runner.execute(true)));
Assert.assertEquals("REBOOT_REQUIRED", getValue("status", runner.execute(false)));
Assert.assertEquals("REBOOT_REQUIRED", getValue("status", runner.execute(true)));
EasyMock.verify(paths, installer);
}
{
final InstallerInterface installer = EasyMock.createStrictMock(InstallerInterface.class);
final Runner runner = new Runner(installer);
EasyMock.replay(installer);
Assert.assertEquals("REBOOT_REQUIRED", getValue("status", runner.execute(false)));
Assert.assertEquals("REBOOT_REQUIRED", getValue("status", runner.execute(true)));
EasyMock.verify(installer);