Package com.google.eclipse.protobuf.ui.preferences

Source Code of com.google.eclipse.protobuf.ui.preferences.AbsractPreferencePageTestCase

/*
* Copyright (c) 2012 Google Inc.
*
* All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse
* Public License v1.0 which accompanies this distribution, and is available at
*
* http://www.eclipse.org/legal/epl-v10.html
*/
package com.google.eclipse.protobuf.ui.preferences;

import org.eclipse.core.runtime.CoreException;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;

import com.google.eclipse.protobuf.ui.junit.XtextRule;
import com.google.eclipse.protobuf.ui.swtbot.ProtobufBot;

/**
* @author alruiz@google.com (Alex Ruiz)
*/
public abstract class AbsractPreferencePageTestCase {
  protected static ProtobufBot robot;

  @BeforeClass public static void resetWorkbench() throws CoreException {
    robot = new ProtobufBot();
    robot.resetAll();
  }

  @Rule public XtextRule xtext = new XtextRule();

  @Before public void restoreDefaults() {
    robot.button("Restore Defaults").click();
    applyChanges();
  }

  protected void applyChanges() {
    robot.button("Apply").click();
  }
}
TOP

Related Classes of com.google.eclipse.protobuf.ui.preferences.AbsractPreferencePageTestCase

TOP
Copyright © 2018 www.massapi.com. 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.