Ejemplo n.º 1
0
  public void testGetPercent() throws Exception {
    _mockInstallProcess.initialize();

    ProgressTracker progressTracker = getAttribute(ProgressTracker.PERCENT);

    Assert.assertEquals(0, progressTracker.getPercent());

    _mockInstallProcess.download();
    _mockInstallProcess.copy();

    progressTracker = getAttribute(ProgressTracker.PERCENT);

    Assert.assertEquals(progressTracker.getPercent(), 50);
  }
Ejemplo n.º 2
0
  @Test
  public void testInitialStatus() throws Exception {
    _mockInstallProcess.initialize();

    ProgressTracker progressTracker = getAttribute(ProgressTracker.PERCENT);

    Assert.assertEquals(ProgressStatusConstants.PREPARED, progressTracker.getStatus());
    Assert.assertEquals(StringPool.BLANK, progressTracker.getMessage());
    Assert.assertEquals(0, progressTracker.getPercent());
  }