ss: Change datastore.tests to a fragment plug-in
authorAlexandre Montplaisir <alexmonthy@efficios.com>
Wed, 14 Dec 2016 19:24:57 +0000 (14:24 -0500)
committerAlexandre Montplaisir <alexmonthy@efficios.com>
Thu, 5 Jan 2017 22:06:14 +0000 (17:06 -0500)
This will allow us to use the same package names in the test
classes as the runtime ones. That way tests will have access
to package-visible (default visibility methods).

This will remove the need of having tons of public methods just
for testing. Default-visibility methods (or even protected, where
needed) are arguably much safer, and won't risk confusing future
clients.

Change-Id: I0393ac9103f94afcb9a818cbe2e7c8dfcadcac18
Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Reviewed-on: https://git.eclipse.org/r/87163
Reviewed-by: Hudson CI
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Tested-by: Genevieve Bastien <gbastien+lttng@versatic.net>
statesystem/org.eclipse.tracecompass.datastore.core.tests/META-INF/MANIFEST.MF
statesystem/org.eclipse.tracecompass.datastore.core.tests/src/org/eclipse/tracecompass/datastore/core/tests/BackendTestPlugin.java [deleted file]

index 36fad76840bae8287a1bcd11803f80c3d4b1c134..ae41c3d204c5bb96b13149a163ed8cc20574aed6 100644 (file)
@@ -5,10 +5,6 @@ Bundle-Vendor: %Bundle-Vendor
 Bundle-Version: 1.0.0.qualifier
 Bundle-Localization: plugin
 Bundle-SymbolicName: org.eclipse.tracecompass.datastore.core.tests;singleton:=true
-Bundle-Activator: org.eclipse.tracecompass.datastore.core.tests.BackendTestPlugin
-Bundle-ActivationPolicy: lazy
+Fragment-Host: org.eclipse.tracecompass.datastore.core
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.junit;bundle-version="4.0.0",
- org.eclipse.core.runtime,
- org.eclipse.core.resources
-Export-Package: org.eclipse.tracecompass.datastore.core.tests
+Require-Bundle: org.junit;bundle-version="4.0.0"
diff --git a/statesystem/org.eclipse.tracecompass.datastore.core.tests/src/org/eclipse/tracecompass/datastore/core/tests/BackendTestPlugin.java b/statesystem/org.eclipse.tracecompass.datastore.core.tests/src/org/eclipse/tracecompass/datastore/core/tests/BackendTestPlugin.java
deleted file mode 100644 (file)
index daf1df5..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2016 École Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
-
-package org.eclipse.tracecompass.datastore.core.tests;
-
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * Plugin's activator
- */
-public class BackendTestPlugin implements BundleActivator {
-
-    /**
-     * The plug-in ID
-     */
-    public static final String PLUGIN_ID = "org.eclipse.tracecompass.datastore.core.tests";
-
-    private static BundleContext fContext;
-
-    /**
-     * Gets the bundle of this plug-in.
-     *
-     * @return the bundle
-     */
-    public static Bundle getBundle() {
-        if (fContext == null) {
-            return null;
-        }
-        return fContext.getBundle();
-    }
-
-    @Override
-    public void start(BundleContext context) throws Exception {
-        fContext = context;
-    }
-
-    @Override
-    public void stop(BundleContext context) throws Exception {
-
-    }
-
-}
This page took 0.025931 seconds and 5 git commands to generate.