protected void tearDown() throws Exception {
   try {
     super.tearDown();
     ArrayBaseTest_Generics.tearDownActionData();
   } catch (RecognitionException re) {
     // do nothing
   } catch (TokenStreamException te) {
     // do nothing
   }
 }
  /*
   * (non-Javadoc)
   *
   * @see junit.framework.TestCase#setUp()
   */
  protected void setUp() throws Exception {
    super.setUp();

    // if it's the first test of this class that's being setup
    if (!initialized) {
      loadProject("CommunicationTestModel");
      initialized = true;
      workbench = PlatformUI.getWorkbench();
    }
  }
  protected void setUp() throws Exception {
    super.setUp();
    String componentPackageName = "Arrays";
    PersistableModelComponent domainComponentPackage =
        ensureAvailableAndLoaded(
            projectName, componentPackageName, false, false, "Component Package");
    arrayModelRoot = (Ooaofooa) domainComponentPackage.getRootModelElement().getModelRoot();

    IPreferenceStore store = CorePlugin.getDefault().getPreferenceStore();
    store.setValue(BridgePointPreferencesStore.ALLOW_IMPLICIT_COMPONENT_ADDRESSING, true);

    class ComponentNameTest implements ClassQueryInterface_c {
      public boolean evaluate(Object candidate) {
        Component_c selected = (Component_c) candidate;
        return selected.getName().equals("SingleDimensionFixedArrays");
      }
    }
    Component_c comp = Component_c.ComponentInstance(arrayModelRoot, new ComponentNameTest());

    populateFunctionInstances();
    populateBridgeInstances();
    class Object_test1_c implements ClassQueryInterface_c {
      Object_test1_c(String id) {
        m_id = id;
      }

      private String m_id;

      public boolean evaluate(Object inst) {
        ModelClass_c selected = (ModelClass_c) inst;
        return selected.getKey_lett().equals(m_id);
      }
    }
    ModelClass_c testObj =
        ModelClass_c.ModelClassInstance(arrayModelRoot, new Object_test1_c("A_T")); // $NON-NLS-1$

    populateTransformerInstances(testObj, false);

    populateInterfaceOperationInstances(comp, "Port1", true);
    populateInterfaceOperationInstances(comp, "Port2", false);
    populateArrayStateActionInstances();
  }
Esempio n. 4
0
 @After
 public void tearDown() throws Exception {
   // undo paste
   if (pasteSuccessful) {
     if (!TransactionManager.getSingleton().getUndoStack().isEmpty()) {
       TransactionManager.getSingleton().getUndoAction().run();
     }
   }
   // undo RGO update
   if (rgoUpdateSuccessful) {
     if (!TransactionManager.getSingleton().getUndoStack().isEmpty()) {
       TransactionManager.getSingleton().getUndoAction().run();
     }
   }
   // undo cut
   if (cutSuccessful) {
     if (!TransactionManager.getSingleton().getUndoStack().isEmpty()) {
       TransactionManager.getSingleton().getUndoAction().run();
     }
   }
   rgoUpdateSuccessful = false;
   super.tearDown();
 }
Esempio n. 5
0
 @Before
 public void setUp() throws Exception {
   Ooaofooa.setPersistEnabled(true);
   super.setUp();
 }