Commit 31c947c3 authored by Jay Jay Billings's avatar Jay Jay Billings
Browse files

Removed some reactor files.



Removed some reactor files that were either missed or readded by
mistake.
Signed-off-by: default avatarJay Jay Billings <billingsjj@ornl.gov>
parent 61ecf044
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.ice.client.widgets.reactoreditor.lwr.test</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: ReactorEditor LWR Test Plugin
Bundle-SymbolicName: org.eclipse.ice.client.widgets.reactoreditor.lwr.test
Bundle-Version: 2.1.8
Fragment-Host: org.eclipse.ice.client.widgets.reactoreditor.lwr;bundle-version="2.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: org.junit;bundle-version="4.10.0"
Bundle-Vendor: Oak Ridge National Laboratory
Import-Package: org.eclipse.ice.io.hdf
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>About</title>
</head>
<body lang="EN-US">
<h2>About This Content</h2>
<p>July 1, 2014</p>
<h3>License</h3>
<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
indicated below, the Content is provided to you under the terms and conditions of the
Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
apply to your use of any object code in the Content. Check the Redistributor's license that was
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
</body>
</html>
\ No newline at end of file
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ICE</groupId>
<artifactId>org.eclipse.ice.build</artifactId>
<version>2.1.8</version>
<relativePath>../${pom-filename}</relativePath>
</parent>
<groupId>ICE</groupId>
<artifactId>org.eclipse.ice.client.widgets.reactoreditor.lwr.test</artifactId>
<packaging>eclipse-test-plugin</packaging>
<properties>
<sonar.skip>true</sonar.skip>
</properties>
</project>
/*******************************************************************************
* 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:
* Initial API and implementation and/or initial documentation - Jay Jay Billings,
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.client.widgets.reactoreditor.lwr.properties.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.ice.client.widgets.reactoreditor.lwr.properties.PropertySourceFactory;
import org.eclipse.ice.client.widgets.reactoreditor.properties.SimpleProperty;
import org.eclipse.ice.reactor.LWRComponent;
import org.eclipse.ice.reactor.LWRRod;
import org.eclipse.ice.reactor.Ring;
import org.eclipse.ice.reactor.Tube;
import org.eclipse.ice.reactor.bwr.BWReactor;
import org.eclipse.ice.reactor.pwr.ControlBank;
import org.eclipse.ice.reactor.pwr.FuelAssembly;
import org.eclipse.ice.reactor.pwr.IncoreInstrument;
import org.eclipse.ice.reactor.pwr.PressurizedWaterReactor;
import org.eclipse.ice.reactor.pwr.RodClusterAssembly;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.PropertyDescriptor;
import org.junit.Test;
/**
* This class tests the output IPropertySource from the PropertySourceFactory
* for LWRComponents.
*
* @author Jordan H. Deyton
*
*/
public class PropertySourceFactoryTester {
/**
* Sets up the List of basic properties for LWRComponents.
*/
private List<SimpleProperty> getBaseProperties(LWRComponent component) {
// Initialize the list and add the basic properties.
List<SimpleProperty> properties = new ArrayList<SimpleProperty>();
String category = "Basic Properties";
properties.add(new SimpleProperty("name", "Name", category, component
.getName()));
properties.add(new SimpleProperty("description", "Description",
category, component.getDescription()));
properties.add(new SimpleProperty("id", "ID", category, component
.getId()));
return properties;
}
/**
* Checks getPropertySource for base LWRComponents.
*/
@Test
public void checkLWRComponent() {
// Initialize a PropertySourceFactory.
PropertySourceFactory factory = new PropertySourceFactory();
// Set up the component and its special properties.
LWRComponent component = new LWRComponent();
// Get the information we need to test.
List<SimpleProperty> properties = getBaseProperties(component);
IPropertySource source = factory.getPropertySource(component);
assertNotNull(source);
// Update the List of properties for this component type.
// Nothing to add... yet.
// Checks all of the properties, their descriptors, and their values.
IPropertyDescriptor[] descriptors = source.getPropertyDescriptors();
for (SimpleProperty property : properties) {
IPropertyDescriptor descriptor = null;
for (int i = 0; i < descriptors.length && descriptor == null; i++) {
if (property.getId().equals(descriptors[i].getId())) {
descriptor = descriptors[i];
}
}
// Make sure a corresponding descriptor was found.
if (descriptor == null) {
fail();
}
// Check the descriptor against the expected base property's
// descriptor.
PropertyDescriptor baseDescriptor = property
.getPropertyDescriptor();
assertEquals(baseDescriptor.getId(), descriptor.getId());
assertEquals(baseDescriptor.getDisplayName(),
descriptor.getDisplayName());
assertEquals(baseDescriptor.getCategory(), descriptor.getCategory());
Object id = property.getId();
Object value = property.getValue();
// Check the value.
assertEquals(value, source.getPropertyValue(id));
}
return;
}
/**
* Checks getPropertySource for PressurizedWaterReactors.
*/
@Test
public void checkPressurizedWaterReactor() {
// Initialize a PropertySourceFactory.
PropertySourceFactory factory = new PropertySourceFactory();
// Set up the component and its special properties.
PressurizedWaterReactor component = new PressurizedWaterReactor(1);
// Get the information we need to test.
List<SimpleProperty> properties = getBaseProperties(component);
IPropertySource source = factory.getPropertySource(component);
assertNotNull(source);
// Update the List of properties for this component type.
// Add dimension properties.
String category = "Dimensions";
properties
.add(new SimpleProperty("PWReactor.size",
"Size (length, # of assemblies)", category, component
.getSize()));
// Checks all of the properties, their descriptors, and their values.
IPropertyDescriptor[] descriptors = source.getPropertyDescriptors();
for (SimpleProperty property : properties) {
IPropertyDescriptor descriptor = null;
for (int i = 0; i < descriptors.length && descriptor == null; i++) {
if (property.getId().equals(descriptors[i].getId())) {
descriptor = descriptors[i];
}
}
// Make sure a corresponding descriptor was found.
if (descriptor == null) {
fail();
}
// Check the descriptor against the expected base property's
// descriptor.
PropertyDescriptor baseDescriptor = property
.getPropertyDescriptor();
assertEquals(baseDescriptor.getId(), descriptor.getId());
assertEquals(baseDescriptor.getDisplayName(),
descriptor.getDisplayName());
assertEquals(baseDescriptor.getCategory(), descriptor.getCategory());
Object id = property.getId();
Object value = property.getValue();
// Check the value.
assertEquals(value, source.getPropertyValue(id));
}
return;
}
/**
* Checks getPropertySource for BWReactors.
*/
@Test
public void checkBWReactor() {
// Initialize a PropertySourceFactory.
PropertySourceFactory factory = new PropertySourceFactory();
// Set up the component and its special properties.
BWReactor component = new BWReactor(1);
// Get the information we need to test.
List<SimpleProperty> properties = getBaseProperties(component);
IPropertySource source = factory.getPropertySource(component);
assertNotNull(source);
// Update the List of properties for this component type.
// Nothing to add... yet.
// Checks all of the properties, their descriptors, and their values.
IPropertyDescriptor[] descriptors = source.getPropertyDescriptors();
for (SimpleProperty property : properties) {
IPropertyDescriptor descriptor = null;
for (int i = 0; i < descriptors.length && descriptor == null; i++) {
if (property.getId().equals(descriptors[i].getId())) {
descriptor = descriptors[i];
}
}
// Make sure a corresponding descriptor was found.
if (descriptor == null) {
fail();
}
// Check the descriptor against the expected base property's
// descriptor.
PropertyDescriptor baseDescriptor = property
.getPropertyDescriptor();
assertEquals(baseDescriptor.getId(), descriptor.getId());
assertEquals(baseDescriptor.getDisplayName(),
descriptor.getDisplayName());
assertEquals(baseDescriptor.getCategory(), descriptor.getCategory());
Object id = property.getId();
Object value = property.getValue();
// Check the value.
assertEquals(value, source.getPropertyValue(id));
}
return;
}
/**
* Checks getPropertySource for FuelAssemblies.
*/
@Test
public void checkFuelAssembly() {
// Initialize a PropertySourceFactory.
PropertySourceFactory factory = new PropertySourceFactory();
// Set up the component and its special properties.
FuelAssembly component = new FuelAssembly(1);
// Get the information we need to test.
List<SimpleProperty> properties = getBaseProperties(component);
IPropertySource source = factory.getPropertySource(component);
assertNotNull(source);
// Update the List of properties for this component type.
// Add dimension properties.
String category = "Dimensions";
properties.add(new SimpleProperty("FuelAssembly.size",
"Size (length, # of rods)", category, component.getSize()));
properties.add(new SimpleProperty("FuelAssembly.rodPitch", "Rod Pitch",
category, component.getRodPitch()));
// Checks all of the properties, their descriptors, and their values.
IPropertyDescriptor[] descriptors = source.getPropertyDescriptors();
for (SimpleProperty property : properties) {
IPropertyDescriptor descriptor = null;
for (int i = 0; i < descriptors.length && descriptor == null; i++) {
if (property.getId().equals(descriptors[i].getId())) {
descriptor = descriptors[i];
}
}
// Make sure a corresponding descriptor was found.
if (descriptor == null) {
fail();
}
// Check the descriptor against the expected base property's
// descriptor.
PropertyDescriptor baseDescriptor = property
.getPropertyDescriptor();
assertEquals(baseDescriptor.getId(), descriptor.getId());
assertEquals(baseDescriptor.getDisplayName(),
descriptor.getDisplayName());
assertEquals(baseDescriptor.getCategory(), descriptor.getCategory());
Object id = property.getId();
Object value = property.getValue();
// Check the value.
assertEquals(value, source.getPropertyValue(id));
}
return;
}
/**
* Checks getPropertySource for RodClusterAssemblies.
*/
@Test
public void checkRodClusterAssembly() {
// Initialize a PropertySourceFactory.
PropertySourceFactory factory = new PropertySourceFactory();
// Set up the component and its special properties.
RodClusterAssembly component = new RodClusterAssembly(1);
// Get the information we need to test.
List<SimpleProperty> properties = getBaseProperties(component);
IPropertySource source = factory.getPropertySource(component);
assertNotNull(source);
// Update the List of properties for this component type.
// Add dimension properties.
String category = "Dimensions";
properties.add(new SimpleProperty("RodClusterAssembly.size",
"Size (length, # of rods)", category, component.getSize()));
properties.add(new SimpleProperty("RodClusterAssembly.rodPitch",
"Rod Pitch", category, component.getRodPitch()));
// Checks all of the properties, their descriptors, and their values.
IPropertyDescriptor[] descriptors = source.getPropertyDescriptors();
for (SimpleProperty property : properties) {
IPropertyDescriptor descriptor = null;
for (int i = 0; i < descriptors.length && descriptor == null; i++) {
if (property.getId().equals(descriptors[i].getId())) {
descriptor = descriptors[i];
}
}
// Make sure a corresponding descriptor was found.
if (descriptor == null) {
fail();
}
// Check the descriptor against the expected base property's
// descriptor.
PropertyDescriptor baseDescriptor = property
.getPropertyDescriptor();
assertEquals(baseDescriptor.getId(), descriptor.getId());
assertEquals(baseDescriptor.getDisplayName(),
descriptor.getDisplayName());
assertEquals(baseDescriptor.getCategory(), descriptor.getCategory());
Object id = property.getId();
Object value = property.getValue();
// Check the value.
assertEquals(value, source.getPropertyValue(id));
}
return;
}
/**
* Checks getPropertySource for LWRRods.
*/
@Test
public void checkLWRRod() {
// Initialize a PropertySourceFactory.
PropertySourceFactory factory = new PropertySourceFactory();
// Set up the component and its special properties.
LWRRod component = new LWRRod();
// Get the information we need to test.
List<SimpleProperty> properties = getBaseProperties(component);
IPropertySource source = factory.getPropertySource(component);
assertNotNull(source);
// Update the List of properties for this component type.
// Add fill gas properties.
String category = "Fill Gas";
properties.add(new SimpleProperty("LWRRod.fillGasName", "Name",
category, component.getFillGas().getName()));
properties.add(new SimpleProperty("LWRRod.fillGasDesc", "Description",
category, component.getFillGas().getDescription()));
properties.add(new SimpleProperty("LWRRod.fillGasPressure", "Pressure",
category, component.getPressure()));
// Add cladding properties.
category = "Cladding";
properties.add(new SimpleProperty("LWRRod.cladName", "Name", category,
component.getClad().getMaterial().getName()));
properties.add(new SimpleProperty("LWRRod.cladDesc", "Description",
category, component.getClad().getMaterial().getDescription()));
// Add other properties.
category = "Other";
properties.add(new SimpleProperty("LWRRod.nBlocks",
"# of Material Blocks", category, component.getMaterialBlocks()
.size()));
// Checks all of the properties, their descriptors, and their values.
IPropertyDescriptor[] descriptors = source.getPropertyDescriptors();
for (SimpleProperty property : properties) {
IPropertyDescriptor descriptor = null;
for (int i = 0; i < descriptors.length && descriptor == null; i++) {
if (property.getId().equals(descriptors[i].getId())) {
descriptor = descriptors[i];
}
}
// Make sure a corresponding descriptor was found.
if (descriptor == null) {
fail();
}
// Check the descriptor against the expected base property's
// descriptor.
PropertyDescriptor baseDescriptor = property
.getPropertyDescriptor();
assertEquals(baseDescriptor.getId(), descriptor.getId());
assertEquals(baseDescriptor.getDisplayName(),
descriptor.getDisplayName());
assertEquals(baseDescriptor.getCategory(), descriptor.getCategory());
Object id = property.getId();
Object value = property.getValue();
// Check the value.
assertEquals(value, source.getPropertyValue(id));
}
return;