Exemple #1
0
 def test_name_property(self):
     starship = StarShip(mglt=10, name="ship", consumables=40)
     self.assertEqual("ship", starship.name)
Exemple #2
0
 def test_plan_journey_Equal_0(self):
     starship = StarShip(mglt=100, name="ship", consumables=400)
     self.assertEqual(0, starship.plan_journey(100))
Exemple #3
0
 def test_plan_journey_Equal_None(self):
     starship = StarShip(mglt=0, name="ship", consumables=400)
     self.assertIsNone(starship.plan_journey(100))
Exemple #4
0
 def test_plan_journey_Equal(self):
     starship = StarShip(mglt=1, name="ship", consumables=40)
     self.assertEqual(1, starship.plan_journey(41))
Exemple #5
0
 def test_plan_journey_ZeroConsumables_IsNone(self):
     starship = StarShip(mglt=100, name="ship", consumables=0)
     self.assertIsNone(starship.plan_journey(1000))
Exemple #6
0
 def test_journey_duration_NoneSpeed_IsNone(self):
     starship = StarShip(mglt=None, name="ship", consumables=40)
     self.assertIsNone(starship._journey_duration(100))
Exemple #7
0
 def test_journey_duration_NotEqual(self):
     starship = StarShip(mglt=10, name="ship", consumables=40)
     self.assertNotEqual(12, starship._journey_duration(100))
Exemple #8
0
 def test_journey_duration_Equal_0(self):
     starship = StarShip(mglt=10, name="ship", consumables=40)
     self.assertEqual(0, starship._journey_duration(0))