Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 561831 - [Passage] add lic.licenses.model.tests bundle #232

Merged
merged 1 commit into from
Jun 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bundles/org.eclipse.passage.lic.emf/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Export-Package: org.eclipse.passage.lic.emf.ecore,
org.eclipse.passage.loc.dashboard.ui,
org.eclipse.passage.loc.workbench,
org.eclipse.passage.lic.users.model,
org.eclipse.passage.lic.products.model",
org.eclipse.passage.lic.products.model,
org.eclipse.passage.lic.licenses.model",
org.eclipse.passage.lic.internal.emf.i18n;x-internal:=true
Bundle-ActivationPolicy: lazy
1 change: 1 addition & 0 deletions bundles/org.eclipse.passage.lic.licenses.model/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target/classes/"/>
</classpath>
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.core.runtime;bundle-version="0.0.0";resolution:=optional;x-installation:=greedy,
org.eclipse.emf.ecore;bundle-version="0.0.0";visibility:=reexport,
org.eclipse.passage.lic.emf;bundle-version="0.6.0",
org.eclipse.passage.lic.licenses;bundle-version="0.0.0";visibility:=reexport
Export-Package: org.eclipse.passage.lic.licenses.model.api,
Export-Package: org.eclipse.passage.lic.internal.licenses.model;x-friends:="org.eclipse.passage.loc.dashboard.ui",
org.eclipse.passage.lic.licenses.model.api,
org.eclipse.passage.lic.licenses.model.impl,
org.eclipse.passage.lic.licenses.model.meta,
org.eclipse.passage.lic.licenses.model.util
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
# ArSysOp - initial API and implementation
###############################################################################

source.. = src-gen/
source.. = src-gen/,\
src/
output.. = target/classes
bin.includes = .,\
model/,\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.moveto.lic.internal.licenses.model;
package org.eclipse.passage.lic.internal.licenses.model;

import java.util.HashMap;
import java.util.Map;
Expand All @@ -20,10 +20,9 @@
import org.eclipse.passage.lic.emf.meta.EntityMetadata;
import org.eclipse.passage.lic.emf.meta.PlainEntityMetadata;
import org.eclipse.passage.lic.licenses.LicensePlanDescriptor;
import org.eclipse.passage.lic.licenses.model.api.LicensePlan;
import org.eclipse.passage.lic.licenses.model.meta.LicensesPackage;

//FIXME: AF: remove restriction after moving to the right bundle
@SuppressWarnings("restriction")
public final class LicensesClassMetadata implements ClassMetadata {

private final LicensesPackage meta;
Expand All @@ -37,6 +36,7 @@ public LicensesClassMetadata() {
meta.getLicensePlan(), //
meta.getLicensePlan_Identifier(), //
meta.getLicensePlan_Name()));
map.put(LicensePlan.class, map.get(LicensePlanDescriptor.class));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.eclipse.passage.lic.features.registry.FeatureRegistry;
import org.eclipse.passage.lic.features.registry.FeatureRegistryEvents;
import org.eclipse.passage.lic.internal.features.model.FeaturesClassMetadata;
import org.eclipse.passage.lic.internal.licenses.model.LicensesClassMetadata;
import org.eclipse.passage.lic.internal.products.model.ProductsClassMetadata;
import org.eclipse.passage.lic.internal.users.model.UsersClassMetadata;
import org.eclipse.passage.lic.licenses.LicensePlanDescriptor;
Expand All @@ -47,7 +48,6 @@
import org.eclipse.passage.lic.users.UserOriginDescriptor;
import org.eclipse.passage.lic.users.registry.UserRegistry;
import org.eclipse.passage.lic.users.registry.UserRegistryEvents;
import org.eclipse.passage.moveto.lic.internal.licenses.model.LicensesClassMetadata;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.osgi.framework.FrameworkUtil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ Bundle-Version: 0.1.0.qualifier
Bundle-Name: %Bundle-Name
Bundle-Vendor: %Bundle-Vendor
Bundle-Copyright: %Bundle-Copyright
Fragment-Host: org.eclipse.passage.lic.licenses.model
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.junit;bundle-version="4.12.0"
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,25 @@
*******************************************************************************/
package org.eclipse.passage.lic.licenses.model.tests;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import org.eclipse.passage.lic.internal.licenses.model.LicensesClassMetadata;
import org.eclipse.passage.lic.licenses.LicensePlanDescriptor;
import org.eclipse.passage.lic.licenses.model.api.LicensePlan;
import org.junit.Test;

public class PlaceholderTest {
public class LicensesClassMetadataTest {

private final LicensesClassMetadata metadata;

public LicensesClassMetadataTest() {
metadata = new LicensesClassMetadata();
}

@Test
public void forFurtherDevelopment() {
assertNotNull("I'm a newborn test bundle, just let me grow."); //$NON-NLS-1$
public void licensePlanMetadata() {
assertTrue(metadata.find(LicensePlanDescriptor.class).isPresent());
assertTrue(metadata.find(LicensePlan.class).isPresent());
}

}