added unittest for seeding api
added get_material_deliveries to seeding api started working on de api test
This commit is contained in:
parent
6946ce9957
commit
c325a2c7c2
2 changed files with 38 additions and 6 deletions
|
@ -1,5 +1,8 @@
|
|||
import os
|
||||
import unittest
|
||||
import compLib.Seeding as Seeding
|
||||
import compLib.Api as SeedingApi
|
||||
import compLib.DoubleElimination as De
|
||||
|
||||
|
||||
class SeedingTest(unittest.TestCase):
|
||||
|
@ -13,5 +16,21 @@ class SeedingTest(unittest.TestCase):
|
|||
self.assertEqual(gamestate.get_material_deliveries(), [[3, 1], [0, 3], [3, 1], [3, 1]])
|
||||
|
||||
|
||||
class SeedingApiTest(unittest.TestCase):
|
||||
def test_api_seeding(self):
|
||||
gamestate = Seeding.Gamestate(0)
|
||||
seeding_api = SeedingApi.Seeding()
|
||||
self.assertEqual(seeding_api.get_heuballen(), gamestate.get_heuballen())
|
||||
self.assertEqual(seeding_api.get_logistic_plan(), gamestate.get_logistic_plan())
|
||||
#self.assertEqual(seeding_api.get_material_deliveries(), gamestate.get_material_deliveries())
|
||||
|
||||
|
||||
class DeApiTest(unittest.TestCase):
|
||||
def test_api_de(self):
|
||||
de = De.DoubleElim()
|
||||
print(de.get_goal())
|
||||
#self.assertEqual(de.get_goal(), )
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Reference in a new issue