def test_validate_starting_seniles_must_be_0_or_greater_with_value_of_minus_1( self): validation = ModelRunOptionsValidation(1, 100) self.assertEqual("Must be 0 or greater", validation.validate_starting_seniles(-1))
def test_validate_starting_seniles_must_be_0_or_greater_with_value_of_0( self): validation = ModelRunOptionsValidation(1, 100) self.assertEqual(None, validation.validate_starting_seniles(0))
def test_initialisation_values(self): validation = ModelRunOptionsValidation(1, 100) self.assertEqual(1, validation.min_generations) self.assertEqual(100, validation.max_generations)
def test_validate_starting_adults_must_be_0_or_greater_with_value_of_1( self): validation = ModelRunOptionsValidation(1, 100) self.assertEqual(None, validation.validate_starting_adults(1))
def test_validate_senile_survival_rate_must_be_0_or_greater_for_value_of_1( self): validation = ModelRunOptionsValidation(1, 100) self.assertEqual(None, validation.validate_senile_survival_rate(1))
def test_validate_senile_survival_rate_must_be_1_or_less_for_value_of_2( self): validation = ModelRunOptionsValidation(1, 100) self.assertEqual("Must be 1 or less", validation.validate_senile_survival_rate(2))
def test_validate_adult_birth_rate_must_be_0_or_greater_for_value_of_0( self): validation = ModelRunOptionsValidation(1, 100) self.assertEqual(None, validation.validate_adult_birth_rate(0))
def test_validate_senile_survival_rate_must_be_0_or_greater_for_value_of_minus_one( self): validation = ModelRunOptionsValidation(1, 100) self.assertEqual("Must be 0 or greater", validation.validate_senile_survival_rate(-1))
def test_validate_disease_trigger_must_be_greater_than_0_with_value_of_1( self): validation = ModelRunOptionsValidation(1, 100) self.assertEqual(None, validation.validate_disease_trigger(1))
def test_validate_disease_trigger_must_be_greater_than_0_with_value_of_0( self): validation = ModelRunOptionsValidation(1, 100) self.assertEqual("Must be greater than 0", validation.validate_disease_trigger(0))
def test_validate_generations_ok_for_value_of_100(self): validation = ModelRunOptionsValidation(1, 100) self.assertEqual(None, validation.validate_generations(100))
def test_validate_generations_cannot_be_more_than_max_for_value_of_101( self): validation = ModelRunOptionsValidation(1, 100) self.assertEqual("Must be equal to or less than 100", validation.validate_generations(101))
def test_validate_generations_cannot_be_less_than_min_for_value_of_minus_one( self): validation = ModelRunOptionsValidation(1, 100) self.assertEqual("Must be equal to or greater than 1", validation.validate_generations(-1))