Package com.google.gerrit.pgm.util

Examples of com.google.gerrit.pgm.util.ConsoleUI


      this.initializer = initializer;
    }
  }

  private SiteInit createSiteInit() {
    final ConsoleUI ui = ConsoleUI.getInstance(batchMode);
    final File sitePath = getSitePath();
    final List<Module> m = new ArrayList<Module>();

    m.add(new InitModule());
    m.add(new AbstractModule() {
View Full Code Here


public class LibrariesTest extends TestCase {
  public void testCreate() throws FileNotFoundException {
    final SitePaths site = new SitePaths(new File("."));
    final ReloadSiteLibrary reload = createStrictMock(ReloadSiteLibrary.class);
    final ConsoleUI ui = createStrictMock(ConsoleUI.class);

    replay(ui);
    replay(reload);

    Libraries lib = new Libraries(new Provider<LibraryDownloader>() {
View Full Code Here

    old.setString("sendemail", null, "smtpUser", "email.user");
    old.setString("sendemail", null, "smtpPass", "email.s3kr3t");
    old.save();

    final InitFlags flags = new InitFlags(site);
    final ConsoleUI ui = createStrictMock(ConsoleUI.class);
    Section.Factory sections = new Section.Factory() {
      @Override
      public Section get(String name) {
        return new Section(flags, site, ui, name);
      }
    };

    expect(ui.yesno(eq(true), eq("Upgrade '%s'"), eq(p.getCanonicalPath())))
        .andReturn(true);
    replay(ui);

    UpgradeFrom2_0_x u = new UpgradeFrom2_0_x(site, flags, ui, sections);
    assertTrue(u.isNeedUpgrade());
View Full Code Here

TOP

Related Classes of com.google.gerrit.pgm.util.ConsoleUI

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.