Class AbstractAutomatedContainmentCollectionChangeOrderFramework<C extends org.eclipse.emf.ecore.EObject>


  • public abstract class AbstractAutomatedContainmentCollectionChangeOrderFramework<C extends org.eclipse.emf.ecore.EObject>
    extends Object
    Automated framework for containment collections testing.

    Restrictions:
    1. Container of elements should be contained in top object
    2. Top object mus contain only one collection container
    • Field Detail

      • projectManager

        protected final IV8ProjectManager projectManager
        the V8 project manager
    • Constructor Detail

      • AbstractAutomatedContainmentCollectionChangeOrderFramework

        protected AbstractAutomatedContainmentCollectionChangeOrderFramework​(TestingWorkspace testingWorkspace,
                                                                             org.eclipse.emf.ecore.EStructuralFeature collectionElementNameFeature,
                                                                             org.eclipse.emf.ecore.EStructuralFeature collectionFeature,
                                                                             IComparisonManager comparisonManager,
                                                                             IV8ProjectManager projectManager,
                                                                             IWorkspaceOrchestrator workspaceOrchestrator,
                                                                             IBmModelManager bmModelManager,
                                                                             IDerivedDataManagerProvider derivedDataManagerProvider,
                                                                             ICheckRepository checkRepository)
        Parameters:
        testingWorkspace - workspace for tests execution, cannot be null
        collectionElementNameFeature - elements name feature, cannot be null
        collectionFeature - container collection feature, cannot be null
        comparisonManager - the comparison manager, cannot be null
        projectManager - the V8 project manager, cannot be null
        operationOrchestrator - the operation orchestrator, cannot be null
        bmModelManager - the BM model manager, cannot be null
        derivedDataManagerProvider - the derived data manager provider, cannot be null
        checkRepository - the check repository, cannot be null
    • Method Detail

      • run

        public void run()
                 throws org.eclipse.core.runtime.CoreException
        Executes tests.
        Throws:
        org.eclipse.core.runtime.CoreException - if tests fail
      • runOnlyImportant

        public void runOnlyImportant()
                              throws org.eclipse.core.runtime.CoreException
        Executes only important tests
        This method executes all tests for modifications of one and two operations;
        tests of three operations are run only if positions stand one-by-one
        Throws:
        org.eclipse.core.runtime.CoreException - if tests fail
      • clearDataSource

        protected abstract void clearDataSource​(IV8Project v8Project,
                                                IBmTransaction transaction)
        Removes containers from data source
        Parameters:
        v8Project - the V8 project to remove containers from, cannot be null
        transaction - transaction to use to remove containers, cannot be null
      • getContainerTopObjectSymlink

        protected abstract String getContainerTopObjectSymlink​(IV8Project v8Project,
                                                               C collectionContainer)
        Gets symlink for container top object
        Parameters:
        v8Project - the V8 project to search, cannot be null
        collectionContainer - container to get top object symlink for, cannot be null
        Returns:
        container top object symlink, never null
      • createCollectionContainer

        protected abstract C createCollectionContainer​(String containerId,
                                                       IBmTransaction transaction,
                                                       Configuration configuration)
        Creates collection container within the configuration
        Parameters:
        containerId - name of the container, cannot benull
        transaction - transaction to use for object attachment, cannot be null
        configuration - configuration to add container in, cannot be null
        Returns:
        created container, never null
      • getContainerByTopObjectSymlink

        protected abstract C getContainerByTopObjectSymlink​(IV8Project v8Project,
                                                            String symlink)
        Gets container for given top object symlink
        Parameters:
        v8Project - the V8 project to search, cannot be null
        symlink - symlink to get object for, cannot be null
        Returns:
        container for given top object symlink, cannot be null