def test_dynamic_length(self): length = Length('length') self.assertEqual(length.calc_value(18), 18) self.assertEqual(length.solve_parameter(18), 18)
def test_dynamic_length_with_addition(self): length = Length('length+8') self.assertEqual(length.calc_value(10), 18) self.assertEqual(length.solve_parameter(18), 10)
def test_dynamic_length_with_multiplier(self): length = Length('length*3') self.assertEqual(length.calc_value(4), 12) self.assertEqual(length.solve_parameter(12), 4) self.assertEqual(length.solve_parameter(13), 5) self.assertEqual(length.solve_parameter(14), 5)
def test_dynamic_length_with_subtractor(self): length = Length('length-8') self.assertEqual(length.calc_value(18), 10) self.assertEqual(length.solve_parameter(10), 18)
def test_dynamic_length(self): length = Length('length') self.assertEquals(length.calc_value(18), 18) self.assertEquals(length.solve_parameter(18), 18)
def test_dynamic_length_with_multiplier(self): length = Length('length*3') self.assertEquals(length.calc_value(4), 12) self.assertEquals(length.solve_parameter(12), 4) self.assertEquals(length.solve_parameter(13), 5) self.assertEquals(length.solve_parameter(14), 5)
def test_dynamic_length_with_addition(self): length = Length('length+8') self.assertEquals(length.calc_value(10), 18) self.assertEquals(length.solve_parameter(18), 10)
def test_dynamic_length_with_subtractor(self): length = Length('length-8') self.assertEquals(length.calc_value(18), 10) self.assertEquals(length.solve_parameter(10), 18)