Skip to content

Commit

Permalink
Added tests for getting supply and return temperature for consumers a…
Browse files Browse the repository at this point in the history
…nd producers
  • Loading branch information
samvanderzwan committed Oct 22, 2024
1 parent ebb96e4 commit 28a0426
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions unit_test/entities/test_esdl_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,50 @@ def test_get_return_temperature_out(self):
# Assert
self.assertEqual(return_temperature, 313.15)

def test_get_supply_temperature_consumer(self):
"""Test get_supply_temperature method."""
# Arrange
asset = self.esdl_object.get_all_assets_of_type("consumer")[0]

# Act
supply_temperature = asset.get_return_temperature("Out")

# Assert
self.assertEqual(supply_temperature, 313.15)

def test_get_return_temperature_consumer(self):
"""Test get_supply_temperature method."""
# Arrange
asset = self.esdl_object.get_all_assets_of_type("consumer")[0]

# Act
supply_temperature = asset.get_supply_temperature("In")

# Assert
self.assertEqual(supply_temperature, 353.15)

def test_get_supply_temperature_producer(self):
"""Test get_supply_temperature method."""
# Arrange
asset = self.esdl_object.get_all_assets_of_type("producer")[0]

# Act
supply_temperature = asset.get_supply_temperature("Out")

# Assert
self.assertEqual(supply_temperature, 353.15)

def test_get_return_temperature_producer(self):
"""Test get_supply_temperature method."""
# Arrange
asset = self.esdl_object.get_all_assets_of_type("producer")[0]

# Act
supply_temperature = asset.get_return_temperature("In")

# Assert
self.assertEqual(supply_temperature, 313.15)

def test_get_port_type_in(self):
"""Test get_port_type method."""
# Arrange
Expand Down

0 comments on commit 28a0426

Please sign in to comment.