use of com.android.tools.idea.tests.gui.framework.fixture.CreateFileFromTemplateDialogFixture in project android by JetBrains.
the class CreateNewClassDialogGuiTest method invalidPackage.
@Test
public void invalidPackage() throws IOException, InterruptedException {
CreateFileFromTemplateDialogFixture dialog = invokeNewFileDialog();
dialog.setName(THING_NAME);
dialog.selectKind(Kind.CLASS);
dialog.setPackage(INVALID_PACKAGE_NAME);
dialog.setVisibility(Visibility.PUBLIC);
dialog.clickOk();
dialog.waitForErrorMessageToAppear(CreateNewClassDialogValidatorExImpl.INVALID_PACKAGE_MESSAGE);
dialog.clickCancel();
}
use of com.android.tools.idea.tests.gui.framework.fixture.CreateFileFromTemplateDialogFixture in project android by JetBrains.
the class CreateNewClassDialogGuiTest method createWithAnImport.
private void createWithAnImport(Kind kind) throws IOException {
CreateFileFromTemplateDialogFixture dialog = invokeNewFileDialog();
dialog.setName(THING_NAME);
dialog.selectKind(kind);
dialog.setInterface(FULLY_QUALIFIED_INTERFACE);
dialog.setPackage(PACKAGE_NAME_0);
dialog.setVisibility(Visibility.PUBLIC);
dialog.clickOk();
assertPackageName(THING_FILE_PATH_0, PACKAGE_NAME_0);
String declaration = kind.equals(Kind.INTERFACE) || kind.equals(Kind.ANNOTATION) ? INTERFACE_EXTENDING_INTERFACE_THAT_NEEDS_IMPORT_DECLARATION : CLASS_IMPLEMENTING_INTERFACE_THAT_NEEDS_IMPORT_DECLARATION;
assertImport(THING_FILE_PATH_0, INTERFACE_IMPORT);
assertDeclaration(THING_FILE_PATH_0, declaration, kind);
}
use of com.android.tools.idea.tests.gui.framework.fixture.CreateFileFromTemplateDialogFixture in project android by JetBrains.
the class CreateNewClassDialogGuiTest method implementAClass.
// Interfaces vs. classes.
@Test
public void implementAClass() throws IOException {
CreateFileFromTemplateDialogFixture dialog = invokeNewFileDialog();
dialog.setName(THING_NAME);
dialog.selectKind(Kind.CLASS);
dialog.setInterface("java.lang.Object");
dialog.clickOk();
dialog.waitForErrorMessageToAppear(CreateNewClassDialogValidatorExImpl.INVALID_QUALIFIED_NAME);
dialog.clickCancel();
}
use of com.android.tools.idea.tests.gui.framework.fixture.CreateFileFromTemplateDialogFixture in project android by JetBrains.
the class CreateNewClassDialogGuiTest method extendAnInterface.
@Test
public void extendAnInterface() throws IOException {
CreateFileFromTemplateDialogFixture dialog = invokeNewFileDialog();
dialog.setName(THING_NAME);
dialog.selectKind(Kind.CLASS);
dialog.setSuperclass("java.lang.Runnable");
dialog.clickOk();
dialog.waitForErrorMessageToAppear(CreateNewClassDialogValidatorExImpl.INVALID_QUALIFIED_NAME);
dialog.clickCancel();
}
use of com.android.tools.idea.tests.gui.framework.fixture.CreateFileFromTemplateDialogFixture in project android by JetBrains.
the class CreateNewClassDialogGuiTest method createPackagePrivate.
private void createPackagePrivate(Kind kind) throws IOException {
CreateFileFromTemplateDialogFixture dialog = invokeNewFileDialog();
dialog.setName(THING_NAME);
dialog.selectKind(kind);
dialog.setPackage(PACKAGE_NAME_0);
dialog.setVisibility(Visibility.PACKAGE_PRIVATE);
dialog.clickOk();
assertPackageName(THING_FILE_PATH_0, PACKAGE_NAME_0);
assertDeclaration(THING_FILE_PATH_0, PACKAGE_PRIVATE_DECLARATION, kind);
}
Aggregations