Commit e7e2c3c6 authored by Robert Smith's avatar Robert Smith
Browse files

Removed non-compiling test classes



Some tests in viz.service.javafx.test belong in another test package and
were not compiling. Removing them until viz.service.javafx.mesh.test is
added.
Signed-off-by: Robert Smith's avatarRobert Smith <smithrw@ornl.gov>
parent 030fbe07
/*******************************************************************************
* Copyright (c) 2014 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.javafx.mesh.datastructures.test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.eclipse.ice.viz.service.javafx.mesh.datatypes.FXEdgeController;
import org.eclipse.ice.viz.service.javafx.mesh.datatypes.FXMeshControllerFactory;
import org.eclipse.ice.viz.service.modeling.AbstractController;
import org.eclipse.ice.viz.service.modeling.AbstractMesh;
import org.eclipse.ice.viz.service.modeling.AbstractView;
import org.eclipse.ice.viz.service.modeling.EdgeMesh;
import org.eclipse.ice.viz.service.modeling.VertexController;
import org.eclipse.ice.viz.service.modeling.VertexMesh;
import org.junit.Test;
/**
* A class to test the functionality of the FXEdge
*
* @author Robert Smith
*
*/
public class FXEdgeTester {
/**
* Test that the edge selects its vertices when it is itself selected.
*/
@Test
public void checkSelection() {
// Create the edge
FXMeshControllerFactory factory = new FXMeshControllerFactory();
EdgeMesh edgeC = new EdgeMesh();
FXEdgeController edge = (FXEdgeController) factory
.createController(edgeC);
// Create a vertex and another part
AbstractController child = new AbstractController(new AbstractMesh(),
new AbstractView());
VertexController vertex = new VertexController(new VertexMesh(),
new AbstractView());
// Add the parts to the edge
edge.addEntity(child);
edge.addEntity(vertex);
// Set the edge as constructing
edge.setProperty("Constructing", "True");
// The edge should set its vertices as constructing but not its other
// children
assertTrue("True".equals(vertex.getProperty("Constructing")));
assertFalse("True".equals(child.getProperty("Constructing")));
// Set the edge as selected
edge.setProperty("Selected", "True");
// The edge should set its vertices as selected but not its other
// children
assertTrue("True".equals(vertex.getProperty("Selected")));
assertFalse("True".equals(child.getProperty("Selected")));
// Set a test property
edge.setProperty("Test", "Value");
// The edge should not pass any properties but "Selected" to its
// children
assertFalse("Value".equals(vertex.getProperty("Test")));
assertFalse("Value".equals(child.getProperty("Test")));
}
}
/*******************************************************************************
* Copyright (c) 2015 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.javafx.mesh.test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
/**
* A class to test the functionality of the AxisGridGizmo
*
* @author Robert Smith
*
*/
public class AxisGridGizmoTester {
/**
* Tests the gizmo's ability to hide/show the axes.
*/
@Test
public void checkAxes() {
// The axes should be visible by default
AxisGridGizmo gizmo = new AxisGridGizmo(1);
assertTrue(gizmo.axesVisible());
// Trying to turn them on again shouldn't break anything
gizmo.toggleAxis(true);
assertTrue(gizmo.axesVisible());
// Turn them off and check that they are gone
gizmo.toggleAxis(false);
assertFalse(gizmo.axesVisible());
// Trying to turn them off shouldn't break anything
gizmo.toggleAxis(false);
assertFalse(gizmo.axesVisible());
// Turn them back on
gizmo.toggleAxis(true);
assertTrue(gizmo.axesVisible());
}
}
/*******************************************************************************
* Copyright (c) 2015 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.javafx.mesh.test;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import org.eclipse.ice.viz.service.javafx.mesh.FXMeshVizService;
import org.eclipse.ice.viz.service.modeling.AbstractController;
import org.eclipse.ice.viz.service.modeling.AbstractMesh;
import org.eclipse.ice.viz.service.modeling.AbstractView;
import org.junit.Test;
/**
* A class to test the FXMeshVizService's functionality
*
* @author Robert Smith
*
*/
public class FXMeshVizServiceTester {
/**
* Test that the service's properties are correct
*/
@Test
public void checkProperties() {
FXMeshVizService service = new FXMeshVizService();
// The service should have the correct name
assertTrue("ICE JavaFX Mesh Editor".equals(service.getName()));
// The service should not support any file extensions
assertTrue(service.getSupportedExtensions().isEmpty());
}
/**
* Tests the service's ability to create a canvas.
*/
@Test
public void checkCanvasCreation() {
// Try to create a canvas
FXMeshVizService service = new FXMeshVizService();
try {
service.createCanvas(new AbstractController(
new AbstractMesh(), new AbstractView()));
} catch (Exception e) {
// If an exception is thrown print the stack trace and fail
e.printStackTrace();
fail();
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment