Commit 62463f9c authored by Robert Smith's avatar Robert Smith
Browse files

Changed MOOSEFormEditor to use OSGi service



The MOOSEFormEditor now uses a consumed OSGi JavaFX Geometry Editor
service, instead of relying on a hard coded one.

Also added viz.service.javafx.mesh to the feature and added more tests.
Signed-off-by: Robert Smith's avatarRobert Smith <SmithRW@ornl.gov>
parent 8f89c3f4
......@@ -32,6 +32,7 @@ Import-Package: org.apache.commons.io;version="2.0.1",
org.eclipse.ice.persistence.xml,
org.eclipse.ice.reactor.plant,
org.eclipse.ice.viz.service,
org.eclipse.ice.viz.service.internal,
org.eclipse.ice.viz.service.javafx.geometry,
org.eclipse.ice.viz.service.javafx.geometry.plant,
org.eclipse.jgit.api;version="4.0.0",
......@@ -45,8 +46,7 @@ Require-Bundle: org.eclipse.ice.client.compatibility;bundle-version="2.0.0",
org.eclipse.ice.datastructures,
org.eclipse.core.runtime;bundle-version="3.11.0",
org.eclipse.swt
Service-Component: OSGI-INF/MOOSEEditorComponent.xml
org.eclipse.core.runtime;bundle-version="3.11.0"
Service-Component: OSGI-INF/viewFactory.xml
Export-Package: org.eclipse.ice.client.widgets.moose
Bundle-Vendor: Oak Ridge National Laboratory
Bundle-ActivationPolicy: lazy
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.ice.client.widgets.moose.ViewFactory">
<implementation class="org.eclipse.ice.client.moose.ViewFactory"/>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.ice.client.widgets.moose.MOOSEFormEditor">
<implementation class="org.eclipse.ice.client.widgets.moose.MOOSEFormEditor"/>
<reference bind="setVizServiceFactory" cardinality="1..1" interface="org.eclipse.ice.viz.service.IVizServiceFactory" name="IVizServiceFactory" policy="dynamic"/>
</scr:component>
\ No newline at end of file
......@@ -37,6 +37,9 @@ import org.eclipse.ice.item.nuclear.MOOSE;
import org.eclipse.ice.item.nuclear.MOOSEModel;
import org.eclipse.ice.reactor.plant.PlantComposite;
import org.eclipse.ice.reactor.plant.ViewFactory;
import org.eclipse.ice.viz.service.BasicVizServiceFactory;
import org.eclipse.ice.viz.service.IVizServiceFactory;
import org.eclipse.ice.viz.service.internal.VizServiceFactoryHolder;
import org.eclipse.ice.viz.service.javafx.geometry.plant.IPlantView;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.Separator;
......@@ -373,11 +376,15 @@ public class MOOSEFormEditor extends ICEFormEditor {
toolBar.setLayoutData(
new GridData(SWT.FILL, SWT.BEGINNING, true, false));
// Create the plant view.
// Create the plant composite.
TreeComposite components = findComponentBlock();
factory.setTree(components);
PlantComposite plant = factory.getPlant();
plantView = new ViewFactory().createPlantView(plant);
//Get the factory and create a plant view from the composite
ViewFactory viewFactory = new ViewFactory();
viewFactory.setVizServiceFactory((BasicVizServiceFactory) VizServiceFactoryHolder.getFactory());
plantView = viewFactory.createPlantView(plant);
// Render the plant view in the analysis Composite.
Composite plantComposite = plantView.createComposite(analysisComposite);
......
......@@ -220,8 +220,6 @@ public class ICEMeshPage extends ICEFormPage
actionToolBarManager = new ToolBarManager(toolBar);
// Get JME3 Geometry service from factory
// IVizServiceFactory factory = editor.getVizServiceFactory();
// IVizService service = new FXMeshVizService();
IVizServiceFactory factory = editor.getVizServiceFactory();
IVizService service = factory.get("ICE JavaFX Mesh Editor");
......
This diff is collapsed.
......@@ -100,38 +100,6 @@ public class FXPlantCompositeConverter
for (PlantComponent plantComp : source.getPlantComponents()) {
plantComp.accept(visitor);
}
// output.getEntitiesByCategory("Junctions").get(0).addEntityByCategory(output.getEntitiesByCategory("Heat
// Exchangers").get(0), "Secondary Input");
output.getEntitiesByCategory("Heat Exchangers").get(0)
.addEntityByCategory(
output.getEntitiesByCategory("Junctions").get(0),
"Secondary Input");
output.getEntitiesByCategory("Heat Exchangers").get(0)
.addEntityByCategory(
output.getEntitiesByCategory("Junctions").get(1),
"Secondary Output");
// PipeMesh mesh = new PipeMesh();
// mesh.setAxialSamples(40);
// mesh.setInnerRadius(40);
// mesh.setLength(100);
// mesh.setRadius(50);
//
// PipeController pipe = (PipeController) new FXPlantViewFactory()
// .createController(mesh);
//
// pipe.setRotation(0, 0, 2);
//
// ShapeMesh box = new ShapeMesh();
// box.setProperty("Type", "Cube");
// ShapeController boxC = new ShapeController(box, new
// FXShapeView(box));
//
// output.addEntity(boxC);
// output.addEntity(pipe);
}
private class FXPlantComponentVisitor implements IPlantComponentVisitor {
......
......@@ -85,35 +85,6 @@ public class ViewFactory {
this.staticFallBack = staticFallBack;
}
/**
* // * Creates a {@link MeshAppState} for the specified // *
* <code>MeshComponent</code>. // * // * @param mesh // * The root
* <code>MeshComponent</code> or mesh that contains // * edges, vertices,
* and other <code>MeshComponent</code>s. // * @return A new
* <code>MeshAppState</code>, or null if there is no core // *
* <code>MasterApplication</code> in the background. //
*/
// public MeshAppState createMeshView(MeshComponent mesh) {
//
// MeshAppState view = null;
//
// if (app != null) {
//
// // If necessary, wait until the MasterApplication has started before
// // trying to add a new AppState, or nothing may initialize.
// if (!app.isInitialized()) {
// app.blockUntilInitialized(0);
// }
//
// view = new MeshAppState();
// view.start(app);
//
// view.setMesh(mesh);
// }
//
// return view;
// }
/**
* Creates a {@link PlantAppState} for the specified
* <code>PlantComposite</code>.
......@@ -126,38 +97,9 @@ public class ViewFactory {
*/
public IPlantView createPlantView(PlantComposite plant) {
// TODO Move this to the IVizService for the jME implementation
// // Try to get the app via OSGi.
// MasterApplication app = MasterApplicationHolder.getApplication();
// // If the flag is set to true and we couldn't get the app through
// OSGi,
// // create a new app.
// if (app == null && staticFallBack) {
// app = MasterApplication.createApplication();
// }
//
// PlantAppState view = null;
//
// if (app != null) {
//
// // If necessary, wait until the MasterApplication has started before
// // trying to add a new AppState, or nothing may initialize.
// if (!app.isInitialized()) {
// app.blockUntilInitialized(0);
// }
//
// view = new PlantAppState();
// view.start(app);
//
// view.setPlant(plant);
// }
//
// return view;
// TODO This should be getting all services and presenting the user with
// a choice, instead of hardcoding the JavaFX editor in.
// IVizService service = factory.get("ICE Geometry Editor");
IVizService service = new FXGeometryVizService();
IVizService service = factory.get("ICE Geometry Editor");
// Create a converter for the plant composite
FXPlantCompositeConverter converter = new FXPlantCompositeConverter(
......@@ -174,7 +116,6 @@ public class ViewFactory {
} catch (Exception e) {
logger.error(
"Error creating Geometry Canvas with Geometry Service.", e);
e.printStackTrace();
}
return (IPlantView) vizCanvas;
......
......@@ -9,7 +9,7 @@
<launcherArgs>
<programArgs>-product org.eclipse.platform.ide --launcher.defaultAction openFile --launcher.appendVmargs -data @noDefault
</programArgs>
<vmArgs>-Dvisit.port=5600 -DREFRESH_BUNDLES=FALSE -Xmx2048M -XX:MaxPermSize=1024M -Dmax_download_size=52428800 -Dorg.eclipse.equinox.http.jetty.http.port=8080 -Dosgi.framework.extensions=org.eclipse.fx.osgi
<vmArgs>-Dvisit.port=5600 -DREFRESH_BUNDLES=FALSE -Xmx2048M -XX:MaxPermSize=1024M -Dmax_download_size=52428800 -Dorg.eclipse.equinox.http.jetty.http.port=8080 -Dosgi.framework.extensions=org.eclipse.fx.osgi
</vmArgs>
<vmArgsLin>-Dvisit.binpath=@user.home/visit/bin
</vmArgsLin>
......@@ -135,42 +135,42 @@ Java and all Java-based trademarks are trademarks of Oracle Corporation in the U
<feature id="org.eclipse.epp.mpc"/>
<feature id="org.eclipse.remote"/>
<feature id="org.eclipse.pde"/>
<feature id="org.eclipse.wst.common_core.feature" version="3.7.0.v201505132009"/>
<feature id="org.eclipse.wst.common_ui.feature" version="3.7.0.v201505132009"/>
<feature id="org.eclipse.wst.jsdt.feature" version="1.6.200.v201505071819"/>
<feature id="org.eclipse.wst.server_core.feature" version="3.3.500.v201505132000"/>
<feature id="org.eclipse.wst.server_ui.feature" version="3.3.500.v201505261810"/>
<feature id="org.eclipse.wst.server_userdoc.feature" version="3.3.300.v201405011426"/>
<feature id="org.eclipse.wst.web_core.feature" version="3.7.0.v201505132009"/>
<feature id="org.eclipse.wst.web_ui.feature" version="3.7.0.v201505261810"/>
<feature id="org.eclipse.wst.web_userdoc.feature" version="3.6.0.v201405062147"/>
<feature id="org.eclipse.wst.xml.xpath2.processor.feature" version="2.0.301.v201409111854"/>
<feature id="org.eclipse.wst.xml_core.feature" version="3.7.0.v201502261749"/>
<feature id="org.eclipse.wst.xml_ui.feature" version="3.7.0.v201505141512"/>
<feature id="org.eclipse.wst.xml_userdoc.feature" version="3.6.0.v201405062147"/>
<feature id="org.eclipse.wst.xsl.feature" version="1.3.401.v201409111855"/>
<feature id="org.eclipse.ptp" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.core" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.debug.sdm" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.etfw" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.etfw.feedback.perfsuite" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.etfw.tau" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.etfw.tau.fortran" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.fortran" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.gem" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.pldt" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.pldt.fortran" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.pldt.upc" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.rdt.sync" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.rdt.sync.cdt" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.rdt.sync.fortran" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.remote" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.remote.terminal" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.rm.ibm.ll" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.rm.ibm.pe" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.rm.ibm.platform.lsf" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.rm.jaxb.contrib" version="9.0.0.201506101404"/>
<feature id="org.eclipse.ptp.rm.slurm" version="9.0.0.201506101404"/>
<feature id="org.eclipse.wst.common_core.feature"/>
<feature id="org.eclipse.wst.common_ui.feature"/>
<feature id="org.eclipse.wst.jsdt.feature"/>
<feature id="org.eclipse.wst.server_core.feature"/>
<feature id="org.eclipse.wst.server_ui.feature"/>
<feature id="org.eclipse.wst.server_userdoc.feature"/>
<feature id="org.eclipse.wst.web_core.feature"/>
<feature id="org.eclipse.wst.web_ui.feature"/>
<feature id="org.eclipse.wst.web_userdoc.feature"/>
<feature id="org.eclipse.wst.xml.xpath2.processor.feature"/>
<feature id="org.eclipse.wst.xml_core.feature"/>
<feature id="org.eclipse.wst.xml_ui.feature"/>
<feature id="org.eclipse.wst.xml_userdoc.feature"/>
<feature id="org.eclipse.wst.xsl.feature"/>
<feature id="org.eclipse.ptp"/>
<feature id="org.eclipse.ptp.core"/>
<feature id="org.eclipse.ptp.debug.sdm"/>
<feature id="org.eclipse.ptp.etfw"/>
<feature id="org.eclipse.ptp.etfw.feedback.perfsuite"/>
<feature id="org.eclipse.ptp.etfw.tau"/>
<feature id="org.eclipse.ptp.etfw.tau.fortran"/>
<feature id="org.eclipse.ptp.fortran"/>
<feature id="org.eclipse.ptp.gem"/>
<feature id="org.eclipse.ptp.pldt"/>
<feature id="org.eclipse.ptp.pldt.fortran"/>
<feature id="org.eclipse.ptp.pldt.upc"/>
<feature id="org.eclipse.ptp.rdt.sync"/>
<feature id="org.eclipse.ptp.rdt.sync.cdt"/>
<feature id="org.eclipse.ptp.rdt.sync.fortran"/>
<feature id="org.eclipse.ptp.remote"/>
<feature id="org.eclipse.ptp.remote.terminal"/>
<feature id="org.eclipse.ptp.rm.ibm.ll"/>
<feature id="org.eclipse.ptp.rm.ibm.pe"/>
<feature id="org.eclipse.ptp.rm.ibm.platform.lsf"/>
<feature id="org.eclipse.ptp.rm.jaxb.contrib"/>
<feature id="org.eclipse.ptp.rm.slurm"/>
<feature id="org.eclipse.ice"/>
<feature id="org.eclipse.cdt.bupc"/>
<feature id="org.eclipse.cdt.core.lrparser.feature"/>
......@@ -233,6 +233,28 @@ Java and all Java-based trademarks are trademarks of Oracle Corporation in the U
<feature id="org.eclipse.swtbot.forms"/>
<feature id="org.eclipse.swtbot.generator.feature"/>
<feature id="org.eclipse.swtbot.ide"/>
<feature id="org.eclipse.nebula.visualization.feature"/>
<feature id="org.eclipse.nebula.widgets.nattable.core.feature"/>
<feature id="org.eclipse.nebula.widgets.nattable.extension.glazedlists.feature"/>
<feature id="org.eclipse.nebula.widgets.nattable.extension.poi.feature"/>
<feature id="org.eclipse.sdk"/>
<feature id="org.eclipse.gef"/>
<feature id="org.eclipse.gef.sdk"/>
<feature id="org.eclipse.equinox.compendium.sdk"/>
<feature id="org.eclipse.equinox.core.feature"/>
<feature id="org.eclipse.equinox.executable"/>
<feature id="org.eclipse.equinox.sdk"/>
<feature id="org.eclipse.equinox.server.core"/>
<feature id="org.eclipse.equinox.server.jetty"/>
<feature id="org.eclipse.equinox.serverside.sdk"/>
<feature id="org.eclipse.equinox.weaving.sdk"/>
<feature id="org.eclipse.equinox.core.sdk"/>
<feature id="org.eclipse.emf.common.ui"/>
<feature id="org.eclipse.emf.ecore.edit"/>
<feature id="org.eclipse.emf.ecore.editor"/>
<feature id="org.eclipse.draw2d"/>
<feature id="org.eclipse.draw2d.sdk"/>
<feature id="org.eclipse.e4.core.tools.feature"/>
<feature id="org.eclipse.fx.runtime.min.feature" version="2.1.0.201508240501"/>
</features>
......@@ -249,7 +271,6 @@ Java and all Java-based trademarks are trademarks of Oracle Corporation in the U
<plugin id="org.eclipse.ice.caebat.batml" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.client.rcp" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.client.widgets" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.client.widgets.moose" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.client.widgets.rcp" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.datastructures" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.dependencies" autoStart="true" startLevel="0" />
......@@ -264,7 +285,6 @@ Java and all Java-based trademarks are trademarks of Oracle Corporation in the U
<plugin id="org.eclipse.ice.proteus" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.reactor.plant" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.reflectivity" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.reflectivity.ui" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.vibe" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.viz" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ice.viz.service" autoStart="true" startLevel="0" />
......@@ -293,4 +313,4 @@ Java and all Java-based trademarks are trademarks of Oracle Corporation in the U
<cssInfo>
</cssInfo>
</product>
</product>
\ No newline at end of file
......@@ -17,11 +17,12 @@ import org.eclipse.ice.viz.service.geometry.reactor.HeatExchangerMesh;
import org.eclipse.ice.viz.service.geometry.reactor.PipeController;
import org.eclipse.ice.viz.service.geometry.reactor.PipeMesh;
import org.eclipse.ice.viz.service.modeling.AbstractView;
import org.eclipse.ice.viz.service.modeling.EdgeAndVertexFaceMesh;
import org.eclipse.ice.viz.service.modeling.Transformation;
import org.junit.Test;
/**
* A class to test the functionality of the HeatExchangerMesh.
* A class to test the functionality of the HeatExchangerController.
*
* @author Robert Smith
*
......@@ -35,7 +36,6 @@ public class HeatExchangerControllerTester {
public void checkPipes(){
//Create a heat exchanger and some pipes
HeatExchangerMesh exchangerMesh = new HeatExchangerMesh();
HeatExchangerController exchanger = new HeatExchangerController(new HeatExchangerMesh(), new AbstractView());
//Create pipes for the exchanger
......@@ -51,4 +51,19 @@ public class HeatExchangerControllerTester {
assertTrue(primary == exchanger.getPrimaryPipe());
}
/**
* Check that the part is cloned correctly.
*/
@Test
public void checkClone(){
//Create a face
HeatExchangerController exchanger= new HeatExchangerController(new HeatExchangerMesh(), new AbstractView());
exchanger.setProperty("Test", "Property");
//Clone it and check that they are identical
HeatExchangerController clone = (HeatExchangerController) exchanger.clone();
assertTrue(exchanger.equals(clone));
}
}
/*******************************************************************************
* Copyright (c) 2016 UT-Battelle, LLC.
* 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
*
* Contributors:
* Robert Smith
*******************************************************************************/
package org.eclipse.ice.viz.service.geometry.reactor.test;
import static org.junit.Assert.assertTrue;
import org.eclipse.ice.viz.service.geometry.reactor.HeatExchangerController;
import org.eclipse.ice.viz.service.geometry.reactor.HeatExchangerMesh;
import org.eclipse.ice.viz.service.geometry.reactor.PipeController;
import org.eclipse.ice.viz.service.geometry.reactor.PipeMesh;
import org.eclipse.ice.viz.service.modeling.AbstractView;
import org.eclipse.ice.viz.service.modeling.EdgeAndVertexFaceMesh;
import org.eclipse.ice.viz.service.modeling.Transformation;
import org.junit.Test;
/**
* A class to test the functionality of the HeatExchangerMesh.
*
* @author Robert Smith
*
*/
public class HeatExchangerMeshTester {
/**
* Check that the part is cloned correctly.
*/
@Test
public void checkClone(){
//Create an exchanger
HeatExchangerMesh exchanger= new HeatExchangerMesh();
exchanger.setProperty("Test", "Property");
//Clone it and check that they are identical
HeatExchangerMesh clone = (HeatExchangerMesh) exchanger.clone();
assertTrue(exchanger.equals(clone));
}
}
/*******************************************************************************
* Copyright (c) 2016 UT-Battelle, LLC.
* 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
*
* Contributors:
* Robert Smith
*******************************************************************************/
package org.eclipse.ice.viz.service.geometry.reactor.test;
import static org.junit.Assert.assertTrue;
import org.eclipse.ice.viz.service.geometry.reactor.HeatExchangerMesh;
import org.eclipse.ice.viz.service.geometry.reactor.JunctionController;
import org.eclipse.ice.viz.service.geometry.reactor.JunctionMesh;
import org.eclipse.ice.viz.service.modeling.AbstractView;
import org.junit.Test;
/**
* A class to test the functionality of the JunctionController
*
* @author Robert Smith
*
*/
public class JunctionControllerTester {
/**
* Check that the part is cloned correctly.
*/
@Test
public void checkClone(){
//Create a junction
JunctionController exchanger = new JunctionController(new JunctionMesh(), new AbstractView());
exchanger.setProperty("Test", "Property");
//Clone it and check that they are identical
JunctionController clone = (JunctionController) exchanger.clone();
assertTrue(exchanger.equals(clone));
}
}
/*******************************************************************************
* Copyright (c) 2016 UT-Battelle, LLC.
* 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
*
* Contributors:
* Robert Smith
*******************************************************************************/
package org.eclipse.ice.viz.service.geometry.reactor.test;
import static org.junit.Assert.assertTrue;
import org.eclipse.ice.viz.service.geometry.reactor.HeatExchangerMesh;
import org.eclipse.ice.viz.service.geometry.reactor.JunctionController;
import org.eclipse.ice.viz.service.geometry.reactor.JunctionMesh;
import org.eclipse.ice.viz.service.modeling.AbstractView;
import org.junit.Test;
/**
* A class to test the functionality of the JunctionMesh
*
* @author Robert Smith
*
*/
public class JunctionMeshTester {
/**
* Check the convenience methods for the JunctionMesh's properties.
*/
@Test
public void checkProperties(){
//The junction for testing
JunctionMesh junction = new JunctionMesh();
//Check the height functions
junction.setHeight(1d);
assertTrue(junction.getHeight() == 1d);
//Check the z in functions
junction.setZIn(2d);
assertTrue(junction.getZIn() == 2d);
//Check the z out functions
junction.setZOut(3d);
assertTrue(junction.getZOut() == 3d);
}
/**
* Check that the part is cloned correctly.
*/
@Test
public void checkClone(){
//Create a junction
JunctionMesh junction = new JunctionMesh();
junction.setProperty("Test", "Property");
//Clone it and check that they are identical
JunctionMesh clone = (JunctionMesh) junction.clone();
assertTrue(junction.equals(clone));
}
}
/*******************************************************************************
* Copyright (c) 2016 UT-Battelle, LLC.
* 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
*
* Contributors:
* Robert Smith
*******************************************************************************/
package org.eclipse.ice.viz.service.geometry.reactor.test;
import static org.junit.Assert.assertTrue;
import org.eclipse.ice.viz.service.geometry.reactor.JunctionMesh;
import org.eclipse.ice.viz.service.geometry.reactor.JunctionView;
import org.junit.Test;
/**
* A class to test the functionality of the JunctionView
*
* @author Robert Smith
*
*/
public class JunctionViewTester {
/**
* Check that the part is cloned correctly.
*/
@Test
public void checkClone(){
//Create a junction
JunctionView junction = new JunctionView();
//Clone it and check that they are identical
JunctionView clone = (JunctionView) junction.clone();
assertTrue(junction.equals(clone));
}
}