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

refact: exclude display methods from jacoco coverage reports #1188

Merged
merged 1 commit into from
Nov 22, 2024
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
2 changes: 2 additions & 0 deletions src/main/java/neqsim/fluidmechanics/flownode/FlowNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import neqsim.thermo.ThermodynamicConstantsInterface;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermodynamicoperations.ThermodynamicOperations;
import neqsim.util.ExcludeFromJacocoGeneratedReport;
import neqsim.util.util.DoubleCloneable;

/**
Expand Down Expand Up @@ -574,6 +575,7 @@ public void setEnhancementType(int type) {}

/** {@inheritDoc} */
@Override
@ExcludeFromJacocoGeneratedReport
public void display(String name) {
DecimalFormat nf = new DecimalFormat();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import neqsim.fluidmechanics.flownode.fluidboundary.heatmasstransfercalc.nonequilibriumfluidboundary.filmmodelboundary.reactivefilmmodel.enhancementfactor.EnhancementFactor;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermodynamicoperations.ThermodynamicOperations;
import neqsim.util.ExcludeFromJacocoGeneratedReport;

/**
* <p>
Expand Down Expand Up @@ -478,6 +479,7 @@ public String[][] createTable(String name) {

/** {@inheritDoc} */
@Override
@ExcludeFromJacocoGeneratedReport
public void display(String name) {
DecimalFormat nf = new DecimalFormat();
nf.setMaximumFractionDigits(5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import neqsim.fluidmechanics.flowsystem.FlowSystemInterface;
import neqsim.fluidmechanics.util.fluidmechanicsvisualization.flownodevisualization.FlowNodeVisualization;
import neqsim.fluidmechanics.util.fluidmechanicsvisualization.flownodevisualization.FlowNodeVisualizationInterface;
import neqsim.util.ExcludeFromJacocoGeneratedReport;

/**
* <p>
Expand Down Expand Up @@ -75,5 +76,6 @@ public void setPoints() {}

/** {@inheritDoc} */
@Override
@ExcludeFromJacocoGeneratedReport
public void displayResult(String name) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

package neqsim.fluidmechanics.util.fluidmechanicsvisualization.flowsystemvisualization.onephaseflowvisualization.pipeflowvisualization;

import neqsim.util.ExcludeFromJacocoGeneratedReport;

/**
* <p>
* PipeFlowVisualization class.
Expand Down Expand Up @@ -120,6 +122,7 @@ public void calcPoints(String name) {

/** {@inheritDoc} */
@Override
@ExcludeFromJacocoGeneratedReport
public void displayResult(String name) {
double[][] points = new double[1][1];
setPoints();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import neqsim.fluidmechanics.flowsystem.FlowSystem;
import neqsim.fluidmechanics.util.fluidmechanicsvisualization.flownodevisualization.twophaseflownodevisualization.TwoPhaseFlowNodeVisualization;
import neqsim.util.ExcludeFromJacocoGeneratedReport;

/**
* <p>
Expand Down Expand Up @@ -115,6 +116,7 @@ public void setPoints() {

/** {@inheritDoc} */
@Override
@ExcludeFromJacocoGeneratedReport
public void displayResult(String name) {
// double[][] points = new double[1][1];
setPoints();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import neqsim.process.mechanicaldesign.MechanicalDesign;
import neqsim.process.util.report.Report;
import neqsim.thermo.system.SystemInterface;
import neqsim.util.ExcludeFromJacocoGeneratedReport;

/**
* <p>
Expand Down Expand Up @@ -59,6 +60,7 @@ public SystemInterface getThermoSystem() {

/** {@inheritDoc} */
@Override
@ExcludeFromJacocoGeneratedReport
public void displayResult() {}

/**
Expand Down Expand Up @@ -102,8 +104,7 @@ public void setController(ControllerDeviceInterface controller) {
* Setter for the field <code>flowValveController</code>.
* </p>
*
* @param controller a {@link neqsim.process.controllerdevice.ControllerDeviceInterface}
* object
* @param controller a {@link neqsim.process.controllerdevice.ControllerDeviceInterface} object
*/
public void setFlowValveController(ControllerDeviceInterface controller) {
this.flowValveController = controller;
Expand Down Expand Up @@ -165,8 +166,7 @@ public EnergyStream getEnergyStream() {
* Setter for the field <code>energyStream</code>.
* </p>
*
* @param energyStream a {@link neqsim.process.equipment.stream.EnergyStream}
* object
* @param energyStream a {@link neqsim.process.equipment.stream.EnergyStream} object
*/
public void setEnergyStream(EnergyStream energyStream) {
setEnergyStream(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import neqsim.process.equipment.stream.StreamInterface;
import neqsim.process.mechanicaldesign.absorber.AbsorberMechanicalDesign;
import neqsim.thermo.system.SystemInterface;
import neqsim.util.ExcludeFromJacocoGeneratedReport;

/**
* <p>
Expand Down Expand Up @@ -49,8 +50,7 @@ public SimpleAbsorber(String name) {
* </p>
*
* @param name name of absorber
* @param inStream1 a {@link neqsim.process.equipment.stream.StreamInterface}
* object
* @param inStream1 a {@link neqsim.process.equipment.stream.StreamInterface} object
*/
public SimpleAbsorber(String name, StreamInterface inStream1) {
super(name);
Expand Down Expand Up @@ -222,6 +222,7 @@ public void run(UUID id) {

/** {@inheritDoc} */
@Override
@ExcludeFromJacocoGeneratedReport
public void displayResult() {
outStream[0].displayResult();
outStream[1].displayResult();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import neqsim.process.equipment.stream.StreamInterface;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermodynamicoperations.ThermodynamicOperations;
import neqsim.util.ExcludeFromJacocoGeneratedReport;

/**
* <p>
Expand Down Expand Up @@ -427,6 +428,7 @@ public double getGasLoadFactor() {

/** {@inheritDoc} */
@Override
@ExcludeFromJacocoGeneratedReport
public void displayResult() {
SystemInterface thermoSystem = mixedStream.getThermoSystem();
DecimalFormat nf = new DecimalFormat();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import neqsim.thermo.phase.PhaseType;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermodynamicoperations.ThermodynamicOperations;
import neqsim.util.ExcludeFromJacocoGeneratedReport;

/**
* <p>
Expand Down Expand Up @@ -379,6 +380,7 @@ public void run(UUID id) {

/** {@inheritDoc} */
@Override
@ExcludeFromJacocoGeneratedReport
public void displayResult() {
SystemInterface thermoSystem = mixedStream.getThermoSystem();
DecimalFormat nf = new DecimalFormat();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import neqsim.process.equipment.stream.StreamInterface;
import neqsim.process.mechanicaldesign.adsorber.AdsorberMechanicalDesign;
import neqsim.thermo.system.SystemInterface;
import neqsim.util.ExcludeFromJacocoGeneratedReport;

/**
* <p>
Expand Down Expand Up @@ -48,8 +49,7 @@ public SimpleAdsorber(String name) {
* </p>
*
* @param name name of the unit operation
* @param inStream1 a {@link neqsim.process.equipment.stream.StreamInterface}
* object
* @param inStream1 a {@link neqsim.process.equipment.stream.StreamInterface} object
*/
public SimpleAdsorber(String name, StreamInterface inStream1) {
this(name);
Expand Down Expand Up @@ -187,6 +187,7 @@ public void run(UUID id) {

/** {@inheritDoc} */
@Override
@ExcludeFromJacocoGeneratedReport
public void displayResult() {
outStream[0].displayResult();
outStream[1].displayResult();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import neqsim.thermo.ThermodynamicConstantsInterface;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermodynamicoperations.ThermodynamicOperations;
import neqsim.util.ExcludeFromJacocoGeneratedReport;

/**
* <p>
Expand Down Expand Up @@ -744,6 +745,7 @@ public void generateCompressorCurves() {

/** {@inheritDoc} */
@Override
@ExcludeFromJacocoGeneratedReport
public void displayResult() {
DecimalFormat nf = new DecimalFormat();
nf.setMaximumFractionDigits(5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import neqsim.process.equipment.stream.StreamInterface;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermodynamicoperations.ThermodynamicOperations;
import neqsim.util.ExcludeFromJacocoGeneratedReport;

/**
* <p>
Expand Down Expand Up @@ -86,8 +87,7 @@ public DistillationColumn(String name, int numberOfTraysLocal, boolean hasReboil
* addFeedStream.
* </p>
*
* @param inputStream a {@link neqsim.process.equipment.stream.StreamInterface}
* object
* @param inputStream a {@link neqsim.process.equipment.stream.StreamInterface} object
* @param feedTrayNumber a int
*/
public void addFeedStream(StreamInterface inputStream, int feedTrayNumber) {
Expand Down Expand Up @@ -143,8 +143,7 @@ public void init() {
// .setTotalNumberOfMoles(((Mixer) trays.get(numberOfTrays -
// 1)).getStream(0).getThermoSystem()
// .getTotalNumberOfMoles() * (1.0));
trays.get(0)
.addStream(trays.get(feedTrayNumber).getLiquidOutStream().clone());
trays.get(0).addStream(trays.get(feedTrayNumber).getLiquidOutStream().clone());
// ((Mixer)
// trays.get(0)).getStream(streamNumbReboil).getThermoSystem().setTotalNumberOfMoles(
// ((Mixer)
Expand All @@ -157,8 +156,7 @@ public void init() {
double feedTrayTemperature = getTray(getFeedTrayNumber()).getTemperature();

if (trays.get(numberOfTrays - 1).getNumberOfInputStreams() > 0) {
condenserTemperature =
trays.get(numberOfTrays - 1).getThermoSystem().getTemperature();
condenserTemperature = trays.get(numberOfTrays - 1).getThermoSystem().getTemperature();
} else {
condenserTemperature = feedTrayTemperature - 1.0;
}
Expand Down Expand Up @@ -343,8 +341,7 @@ public void run(UUID id) {

for (int i = feedTrayNumber; i > 1; i--) {
int replaceStream1 = trays.get(i - 1).getNumberOfInputStreams() - 1;
trays.get(i - 1).replaceStream(replaceStream1,
trays.get(i).getLiquidOutStream());
trays.get(i - 1).replaceStream(replaceStream1, trays.get(i).getLiquidOutStream());
trays.get(i - 1).setPressure(bottomTrayPressure - (i - 1) * dp);
trays.get(i - 1).run(id);
}
Expand All @@ -364,13 +361,11 @@ public void run(UUID id) {

for (int i = numberOfTrays - 2; i >= feedTrayNumber; i--) {
int replaceStream = trays.get(i).getNumberOfInputStreams() - 1;
trays.get(i).replaceStream(replaceStream,
trays.get(i + 1).getLiquidOutStream());
trays.get(i).replaceStream(replaceStream, trays.get(i + 1).getLiquidOutStream());
trays.get(i).run(id);
}
for (int i = 0; i < numberOfTrays; i++) {
err += Math.abs(
oldtemps[i] - trays.get(i).getThermoSystem().getTemperature());
err += Math.abs(oldtemps[i] - trays.get(i).getThermoSystem().getTemperature());
}
logger.info("error iter " + err + " iteration " + iter);
// System.out.println("error iter " + err + " iteration " + iter);
Expand All @@ -395,6 +390,7 @@ public void run(UUID id) {

/** {@inheritDoc} */
@Override
@ExcludeFromJacocoGeneratedReport
public void displayResult() {
distoperations.displayResult();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import neqsim.process.equipment.stream.StreamInterface;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermodynamicoperations.ThermodynamicOperations;
import neqsim.util.ExcludeFromJacocoGeneratedReport;

/**
* <p>
Expand Down Expand Up @@ -95,6 +96,7 @@ public void run(UUID id) {

/** {@inheritDoc} */
@Override
@ExcludeFromJacocoGeneratedReport
public void displayResult() {
DecimalFormat nf = new DecimalFormat();
nf.setMaximumFractionDigits(5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import neqsim.process.util.monitor.HXResponse;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermodynamicoperations.ThermodynamicOperations;
import neqsim.util.ExcludeFromJacocoGeneratedReport;

/**
* <p>
Expand Down Expand Up @@ -89,8 +90,7 @@ public HeatExchanger(String name, StreamInterface inStream1, StreamInterface inS
* Add inlet stream.
* </p>
*
* @param inStream a {@link neqsim.process.equipment.stream.StreamInterface}
* object
* @param inStream a {@link neqsim.process.equipment.stream.StreamInterface} object
*/
public void addInStream(StreamInterface inStream) {
// todo: this is probably intended to specifically set the second stream. should be deprecated
Expand All @@ -104,8 +104,7 @@ public void addInStream(StreamInterface inStream) {
* </p>
*
* @param number a int
* @param inStream a {@link neqsim.process.equipment.stream.StreamInterface}
* object
* @param inStream a {@link neqsim.process.equipment.stream.StreamInterface} object
*/
public void setFeedStream(int number, StreamInterface inStream) {
this.inStream[number] = inStream;
Expand Down Expand Up @@ -446,6 +445,7 @@ public double getDuty() {

/** {@inheritDoc} */
@Override
@ExcludeFromJacocoGeneratedReport
public void displayResult() {
outStream[0].displayResult();
outStream[1].displayResult();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import neqsim.process.util.monitor.HeaterResponse;
import neqsim.thermo.system.SystemInterface;
import neqsim.thermodynamicoperations.ThermodynamicOperations;
import neqsim.util.ExcludeFromJacocoGeneratedReport;

/**
* <p>
Expand Down Expand Up @@ -60,8 +61,7 @@ public Heater(String name) {
* </p>
*
* @param name a {@link java.lang.String} object
* @param inStream a {@link neqsim.process.equipment.stream.StreamInterface}
* object
* @param inStream a {@link neqsim.process.equipment.stream.StreamInterface} object
*/
public Heater(String name, StreamInterface inStream) {
super(name);
Expand Down Expand Up @@ -214,6 +214,7 @@ public void runTransient(double dt, UUID id) {

/** {@inheritDoc} */
@Override
@ExcludeFromJacocoGeneratedReport
public void displayResult() {
// System.out.println("heater dH: " + energyInput);
getOutletStream().displayResult();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.UUID;
import neqsim.process.equipment.stream.StreamInterface;
import neqsim.thermo.system.SystemInterface;
import neqsim.util.ExcludeFromJacocoGeneratedReport;

/**
* <p>
Expand Down Expand Up @@ -68,6 +69,7 @@ public void run(UUID id) {

/** {@inheritDoc} */
@Override
@ExcludeFromJacocoGeneratedReport
public void displayResult() {
System.out.println("heater dH: " + dH);
}
Expand Down
Loading