public void testComponentRenameWithInvalidCharacter() { createElement("Newcomponent", testPackage); Component_c[] cs = Component_c.getManyC_CsOnR8001(PackageableElement_c.getManyPE_PEsOnR8000(testPackage)); Component_c c = cs[cs.length - 1]; UITestingUtilities.addElementToGraphicalSelection(c); doRenameTest(INVALID_CHAR_ERROR, "*"); }
public void testRenameComponentNoName() { createElement("Newcomponent", testPackage); Component_c[] cs = Component_c.getManyC_CsOnR8001(PackageableElement_c.getManyPE_PEsOnR8000(testPackage)); Component_c c = cs[cs.length - 1]; UITestingUtilities.addElementToGraphicalSelection(c); doRenameTest(Messages.resources_nameEmpty, ""); }
public void testRenameComponentExistingFolder() throws CoreException { // create existing folder first ResourcesPlugin.getWorkspace() .getRoot() .getFolder(new Path(testPackage.getFile().getParent().getFullPath() + "/" + getName())) .create(true, true, new NullProgressMonitor()); BaseTest.dispatchEvents(0); createElement("Newcomponent", testPackage); Component_c[] cs = Component_c.getManyC_CsOnR8001(PackageableElement_c.getManyPE_PEsOnR8000(testPackage)); Component_c c = cs[cs.length - 1]; UITestingUtilities.addElementToGraphicalSelection(c); doRenameTest(EXISTING_FOLDER_ERROR, getName()); }
public void doTestParseErrorPreferencesComponent() throws BackingStoreException, CoreException { project = getProjectHandle(projectName); Package_c testPkg = Package_c.getOneEP_PKGOnR1401( m_sys, new ClassQueryInterface_c() { @Override public boolean evaluate(Object candidate) { return ((Package_c) candidate).getName().equals("Component-Test"); } }); setProjectPreference( BridgePointProjectActionLanguagePreferences.ENABLE_ERROR_FOR_EMPTY_SYNCHRONOUS_MESSAGE, true); setProjectPreference( BridgePointProjectActionLanguagePreferences .ENABLE_ERROR_FOR_EMPTY_SYNCHRONOUS_MESSAGE_REALIZED, false); IMarker[] errors = parseModel(testPkg); assertEquals("Incorrect number of parse errors were found.", 0, errors.length); ExternalEntity_c ee = ExternalEntity_c.getOneS_EEOnR8001( PackageableElement_c.getManyPE_PEsOnR8000( Package_c.getManyEP_PKGsOnR8001( PackageableElement_c.getManyPE_PEsOnR8003( Component_c.getManyC_CsOnR8001( PackageableElement_c.getManyPE_PEsOnR8000(testPkg)))))); Bridge_c bridge = Bridge_c.getOneS_BRGOnR19(ee); bridge.setAction_semantics_internal("// test comment"); errors = parseModel(testPkg); assertEquals("Incorrect number of parse errors were found.", 1, errors.length); setProjectPreference( BridgePointProjectActionLanguagePreferences .ENABLE_ERROR_FOR_EMPTY_SYNCHRONOUS_MESSAGE_REALIZED, true); errors = parseModel(testPkg); assertEquals("Incorrect number of parse errors were found.", 5, errors.length); setProjectPreference( BridgePointProjectActionLanguagePreferences .ENABLE_ERROR_FOR_EMPTY_SYNCHRONOUS_MESSAGE_REALIZED, false); setProjectPreference( BridgePointProjectActionLanguagePreferences.ENABLE_ERROR_FOR_EMPTY_SYNCHRONOUS_MESSAGE, false); errors = parseModel(testPkg); assertEquals("Incorrect number of parse errors were found.", 1, errors.length); }