Commit 1a2fc131 authored by Georgios Dagkakis's avatar Georgios Dagkakis

new examples added to test

parent 88d6c42e
...@@ -132,3 +132,26 @@ class SimulationExamples(TestCase): ...@@ -132,3 +132,26 @@ class SimulationExamples(TestCase):
self.assertEquals(result['NumM1'], 2660) self.assertEquals(result['NumM1'], 2660)
self.assertEquals(result['NumM2'], 220) self.assertEquals(result['NumM2'], 220)
def testServerWithShift1(self):
from dream.simulation.Examples.ServerWithShift1 import main
result = main()
self.assertEquals(result['parts'], 3)
self.assertTrue(49.99 < result["working_ratio"] < 50.01)
def testServerWithShift2(self):
from dream.simulation.Examples.ServerWithShift2 import main
result = main()
self.assertEquals(result['parts'], 16)
self.assertTrue(49.99 < result["working_ratio"] < 50.01)
def testServerWithShift3(self):
from dream.simulation.Examples.ServerWithShift3 import main
result = main()
self.assertEquals(result['parts'], 4)
self.assertTrue(59.99 < result["working_ratio"] < 60.01)
def testServerWithShift4(self):
from dream.simulation.Examples.ServerWithShift4 import main
result = main()
self.assertEquals(result['parts'], 2)
self.assertTrue(29.99 < result["working_ratio"] < 30.01)
\ No newline at end of file
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