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