def test_should_get_total_number_of_bits_return_the_right_value( self) -> None: solution = BinarySolution(number_of_variables=2, number_of_objectives=3) solution.variables[0] = [True, False] solution.variables[1] = [False, True, False] self.assertEqual(5, solution.get_total_number_of_bits())
def test_should_get_total_number_of_bits_return_zero_if_the_object_variables_are_not_initialized(self) -> None: solution = BinarySolution(number_of_variables=2, number_of_objectives=3) self.assertEqual(0, solution.get_total_number_of_bits())
def test_should_get_total_number_of_bits_return_the_right_value(self) -> None: solution = BinarySolution(number_of_variables=2, number_of_objectives=3) solution.variables[0] = [True, False] solution.variables[1] = [False, True, False] self.assertEqual(5, solution.get_total_number_of_bits())
def test_should_get_total_number_of_bits_return_zero_if_the_object_variables_are_not_initialized(self) -> None: solution = BinarySolution(number_of_variables=2, number_of_objectives=3) self.assertEqual(0, solution.get_total_number_of_bits())