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