Examples of StsBotConfigEditor


Examples of org.springframework.ide.eclipse.config.tests.util.StsBotConfigEditor

    IEditorPart editor = openEditor();

    assertNotNull("Expects editor to open", editor);
    assertTrue("Expects spring config editor", editor instanceof IConfigEditor);

    StsBotConfigEditor configEditor = getBot().activeConfigEditor();
    configEditor.navigateTo(21, 24);

    // bot.sleep(StsTestUtil.WAIT_TIME);
    StsTestUtil.waitForEditor(editor);
    int quickfixListItemCount = configEditor.getQuickfixListItemCount();
    assertTrue("Expects quick fixes", quickfixListItemCount > 1);
    assertFalse("Expects no duplicate quick fixes", checkNoDuplicateQuickfixes(configEditor));
    configEditor.getStyledText().setFocus();

    configEditor.quickfix("Change to balance");
    configEditor.getStyledText().setFocus();

    // bot.sleep(StsTestUtil.WAIT_TIME);
    StsTestUtil.saveAndWaitForEditor(editor);
    quickfixListItemCount = configEditor.getQuickfixListItemCount();
    assertTrue("Expects no quick fix", quickfixListItemCount == 1);
    configEditor.getStyledText().setFocus();

    assertEquals("Expects quickfix to change property name", "    <property  name=\"balance\"/>",
        configEditor.getTextOnCurrentLine());
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.config.tests.util.StsBotConfigEditor

    IEditorPart editor = openEditor();

    assertNotNull("Expects editor to open", editor);
    assertTrue("Expects spring config editor", editor instanceof IConfigEditor);

    StsBotConfigEditor configEditor = getBot().activeConfigEditor();
    configEditor.navigateTo(6, 46);

    // bot.sleep(StsTestUtil.WAIT_TIME);
    StsTestUtil.waitForEditor(editor);
    int quickfixListItemCount = configEditor.getQuickfixListItemCount();
    assertTrue("Expects quick fixes", quickfixListItemCount > 1);
    assertFalse("Expects no duplicate quick fixes", checkNoDuplicateQuickfixes(configEditor));
    configEditor.getStyledText().setFocus();

    configEditor.quickfix("Remove <constructor-arg> to match 'Account()'");
    configEditor.getStyledText().setFocus();

    // bot.sleep(StsTestUtil.WAIT_TIME);
    StsTestUtil.saveAndWaitForEditor(editor);
    quickfixListItemCount = configEditor.getQuickfixListItemCount();
    assertTrue("Expects no quick fix", quickfixListItemCount == 1);
    configEditor.getStyledText().setFocus();

    assertEquals("Expects quickfix remove constructor arg", "", configEditor.getTextOnLine(7));
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.config.tests.util.StsBotConfigEditor

  public void testClassAttributeQuickfix() throws CoreException, IOException {
    IEditorPart editor = openEditor();

    assertNotNull("Expects editor to open", editor);
    assertTrue("Expects spring config editor", editor instanceof IConfigEditor);
    StsBotConfigEditor configEditor = getBot().activeConfigEditor();
    configEditor.navigateTo(8, 37);

    // bot.sleep(StsTestUtil.WAIT_TIME);
    StsTestUtil.waitForEditor(editor);
    int quickfixListItemCount = configEditor.getQuickfixListItemCount();
    assertTrue("Expects quick fixes", quickfixListItemCount > 1);
    configEditor.getStyledText().setFocus();

    configEditor.quickfix("Change to Account (com.test)");
    configEditor.getStyledText().setFocus();

    // bot.sleep(StsTestUtil.WAIT_TIME);
    StsTestUtil.saveAndWaitForEditor(editor);
    quickfixListItemCount = configEditor.getQuickfixListItemCount();
    assertTrue("Expects no quick fix", quickfixListItemCount == 1);
    configEditor.getStyledText().setFocus();

    assertEquals("Expects quickfix to change class name", "  <bean id=\"classTest2\" class=\"com.test.Account\"/>",
        configEditor.getTextOnCurrentLine());
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.config.tests.util.StsBotConfigEditor

  public void testCreateClassQuickfix() throws CoreException, IOException {
    IEditorPart editor = openEditor();

    assertNotNull("Expects editor to open", editor);
    assertTrue("Expects spring config editor", editor instanceof IConfigEditor);
    StsBotConfigEditor configEditor = getBot().activeConfigEditor();
    configEditor.navigateTo(21, 34);

    // bot.sleep(StsTestUtil.WAIT_TIME);
    StsTestUtil.waitForEditor(editor);
    int quickfixListItemCount = configEditor.getQuickfixListItemCount();
    assertTrue("Expects quick fixes", quickfixListItemCount > 1);
    assertFalse("Expects no duplicate quick fixes", checkNoDuplicateQuickfixes(configEditor));
    configEditor.getStyledText().setFocus();

    configEditor.quickfix("Create class 'Account'");
    bot.shell("New Class").activate();

    SWTBotText text = bot.text(1);
    assertNotNull(text);
    String str = text.getText();
    assertNotNull(str);
    assertEquals("com.test.ui", str);

    bot.button("Finish").click();

    // bot.sleep(StsTestUtil.WAIT_TIME);
    StsTestUtil.saveAndWaitForEditor(editor);
    configEditor.getStyledText().setFocus();

    quickfixListItemCount = configEditor.getQuickfixListItemCount();
    assertTrue("Expects no quick fix", quickfixListItemCount == 1);

    SWTBotEditor javaEditor = bot.editorByTitle("Account.java");
    assertNotNull(javaEditor);
    javaEditor.close();
View Full Code Here

Examples of org.springframework.ide.eclipse.config.tests.util.StsBotConfigEditor

    final IEditorPart editor = openEditor();

    assertNotNull("Expects editor to open", editor);
    assertTrue("Expects spring config editor", editor instanceof IConfigEditor);

    StsBotConfigEditor configEditor = getBot().activeConfigEditor();
    configEditor.navigateTo(21, 29);

    // bot.sleep(StsTestUtil.WAIT_TIME);
    StsTestUtil.waitForEditor(editor);
    int quickfixListItemCount = configEditor.getQuickfixListItemCount();
    assertTrue("Expects quick fixes", quickfixListItemCount > 1);
    assertFalse("Expects no duplicate quick fixes", checkNoDuplicateQuickfixes(configEditor));
    configEditor.getStyledText().setFocus();

    configEditor.quickfix("Change to account [Account] - src/bean-ref-attribute.xml");
    configEditor.getStyledText().setFocus();

    StsTestUtil.saveAndWaitForEditor(editor);
    // bot.sleep(StsTestUtil.WAIT_TIME);
    quickfixListItemCount = configEditor.getQuickfixListItemCount();
    assertTrue("Expects no quick fix", quickfixListItemCount == 1);
    configEditor.getStyledText().setFocus();

    assertEquals("Expects quickfix to change property name", "    <constructor-arg ref=\"account\"/>",
        configEditor.getTextOnCurrentLine());
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.config.tests.util.StsBotConfigEditor

    IEditorPart editor = openEditor();

    assertNotNull("Expects editor to open", editor);
    assertTrue("Expects spring config editor", editor instanceof IConfigEditor);

    StsBotConfigEditor configEditor = getBot().activeConfigEditor();
    configEditor.navigateTo(8, 83);

    // bot.sleep(StsTestUtil.WAIT_TIME);
    StsTestUtil.waitForEditor(editor);
    int quickfixListItemCount = configEditor.getQuickfixListItemCount();
    assertTrue("Expects quick fixes", quickfixListItemCount > 1);
    assertFalse("Expects no duplicate quick fixes", checkNoDuplicateQuickfixes(configEditor));
    configEditor.getStyledText().setFocus();

    configEditor.quickfix("Change to createDefaultAccount() Account - AccountManager");
    configEditor.getStyledText().setFocus();

    // bot.sleep(StsTestUtil.WAIT_TIME);
    StsTestUtil.saveAndWaitForEditor(editor);
    quickfixListItemCount = configEditor.getQuickfixListItemCount();
    assertTrue("Expects no quick fix", quickfixListItemCount == 1);
    configEditor.getStyledText().setFocus();

    assertEquals(
        "Expects quickfix to change property name",
        "  <bean id=\"factoryMethodTest2\" class=\"com.test.AccountManager\" factory-method=\"createDefaultAccount\"/>",
        configEditor.getTextOnCurrentLine());
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.config.tests.util.StsBotConfigEditor

        assertNotNull("Could not load batch-graph page.", page);
        cEditor.setActiveEditor(page);
      }
    });

    StsBotConfigEditor editor = getBot().activeConfigEditor();
    StsBotGefEditor gEditor = editor.toGefEditorFromUri(BatchSchemaConstants.URI);
    List<SWTBotGefEditPart> parts = gEditor.editParts(AllOf.allOf(
        EditPartMatcherFactory.editPartOfType(StructuredActivityPart.class),
        EditPartMatcherFactory.withLabel("limitDecision")));
    assertFalse(parts.isEmpty());
View Full Code Here

Examples of org.springframework.ide.eclipse.config.tests.util.StsBotConfigEditor

        assertNotNull("Could not load batch-graph page.", page);
        cEditor.setActiveEditor(page);
      }
    });

    StsBotConfigEditor editor = getBot().activeConfigEditor();
    StsBotGefEditor gEditor = editor.toGefEditorFromUri(BatchSchemaConstants.URI);
    List<SWTBotGefEditPart> parts = gEditor.editParts(AllOf.allOf(
        EditPartMatcherFactory.editPartOfType(StructuredActivityPart.class),
        EditPartMatcherFactory.withLabel("limitDecision")));
    assertFalse(parts.isEmpty());
View Full Code Here

Examples of org.springframework.ide.eclipse.config.tests.util.StsBotConfigEditor

        assertNotNull("Could not load batch-graph page.", page);
        cEditor.setActiveEditor(page);
      }
    });

    StsBotConfigEditor editor = getBot().activeConfigEditor();
    StsBotGefEditor gEditor = editor.toGefEditorFromUri(BatchSchemaConstants.URI);
    List<SWTBotGefEditPart> parts = gEditor.editParts(EditPartMatcherFactory
        .editPartOfType(SequentialActivityPart.class));
    assertFalse(parts.isEmpty());

    SWTBotGefEditPart editPart = parts.get(0);
View Full Code Here

Examples of org.springframework.ide.eclipse.config.tests.util.StsBotConfigEditor

        assertNotNull("Could not load batch-graph page.", page);
        cEditor.setActiveEditor(page);
      }
    });

    StsBotConfigEditor editor = getBot().activeConfigEditor();
    StsBotGefEditor gEditor = editor.toGefEditorFromUri(BatchSchemaConstants.URI);
    List<SWTBotGefEditPart> parts = gEditor.editParts(EditPartMatcherFactory
        .editPartOfType(NextGraphicalEditPart.class));
    assertFalse(parts.isEmpty());

    SWTBotGefEditPart editPart = parts.get(0);
View Full Code Here
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.