diff --git a/src/main/java/neqsim/thermo/phase/Phase.java b/src/main/java/neqsim/thermo/phase/Phase.java index 17b67d48a..301cf8e10 100644 --- a/src/main/java/neqsim/thermo/phase/Phase.java +++ b/src/main/java/neqsim/thermo/phase/Phase.java @@ -51,7 +51,7 @@ public abstract class Phase implements PhaseInterface { private boolean constantPhaseVolume = false; private PhysicalPropertyModel ppm = PhysicalPropertyModel.DEFAULT; - public neqsim.physicalproperties.PhysicalPropertyHandler physicalPropertyHandler = null; + public PhysicalPropertyHandler physicalPropertyHandler = null; protected boolean useVolumeCorrection = true; protected double molarVolume = 1.0; diff --git a/src/test/java/neqsim/physicalproperties/physicalpropertysystem/PhysicalPropertyModelTest.java b/src/test/java/neqsim/physicalproperties/physicalpropertysystem/PhysicalPropertyModelTest.java new file mode 100644 index 000000000..012ef78e1 --- /dev/null +++ b/src/test/java/neqsim/physicalproperties/physicalpropertysystem/PhysicalPropertyModelTest.java @@ -0,0 +1,27 @@ +package neqsim.physicalproperties.physicalpropertysystem; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; + +public class PhysicalPropertyModelTest { + @Test + void testByName() { + assertEquals(PhysicalPropertyModel.AMINE, PhysicalPropertyModel.byName("amine")); + assertEquals(PhysicalPropertyModel.BASIC, PhysicalPropertyModel.byName("basic")); + assertEquals(PhysicalPropertyModel.CO2WATER, PhysicalPropertyModel.byName("co2water")); + assertEquals(PhysicalPropertyModel.DEFAULT, PhysicalPropertyModel.byName("default")); + assertEquals(PhysicalPropertyModel.GLYCOL, PhysicalPropertyModel.byName("glycol")); + assertEquals(PhysicalPropertyModel.WATER, PhysicalPropertyModel.byName("water")); + } + + + @Test + void testByValue() { + assertEquals(PhysicalPropertyModel.AMINE, PhysicalPropertyModel.byValue(3)); + assertEquals(PhysicalPropertyModel.BASIC, PhysicalPropertyModel.byValue(6)); + assertEquals(PhysicalPropertyModel.CO2WATER, PhysicalPropertyModel.byValue(4)); + assertEquals(PhysicalPropertyModel.DEFAULT, PhysicalPropertyModel.byValue(0)); + assertEquals(PhysicalPropertyModel.GLYCOL, PhysicalPropertyModel.byValue(2)); + assertEquals(PhysicalPropertyModel.WATER, PhysicalPropertyModel.byValue(1)); + } +}