예제 #1
0
 def test_setFixedLength_alters_accepted_lenth(self):
     validator = FloatArrayLengthValidator()
     self.assertFalse(validator.hasLength())
     fixed = 5
     validator.setLength(fixed)
     self.assertTrue(validator.hasLength())
     self.assertEqual(validator.getLength(), fixed)
     validator.clearLength()
     self.assertFalse(validator.hasLength())
예제 #2
0
 def test_setFixedLength_alters_accepted_lenth(self):
     validator = FloatArrayLengthValidator()
     self.assertFalse(validator.hasLength())
     fixed = 5
     validator.setLength(fixed)
     self.assertTrue(validator.hasLength())
     self.assertEquals(validator.getLength(), fixed)
     validator.clearLength()
     self.assertFalse(validator.hasLength())
예제 #3
0
 def test_fixed_length_constructor_return_hasLength(self):
     fixedlength = 9
     validator = FloatArrayLengthValidator(fixedlength)
     self.assertTrue(validator.hasLength())
     self.assertEqual(validator.getLength(), fixedlength)
예제 #4
0
 def test_empty_constructor_has_no_lengths_set(self):
     validator = FloatArrayLengthValidator()
     self.assertFalse(validator.hasLength())
     self.assertFalse(validator.hasMinLength())
     self.assertFalse(validator.hasMaxLength())
예제 #5
0
 def test_empty_constructor_has_no_lengths_set(self):
     validator = FloatArrayLengthValidator()
     self.assertFalse(validator.hasLength())
     self.assertFalse(validator.hasMinLength())
     self.assertFalse(validator.hasMaxLength())
예제 #6
0
 def test_fixed_length_constructor_return_hasLength(self):
     fixedlength = 9
     validator = FloatArrayLengthValidator(fixedlength)
     self.assertTrue(validator.hasLength())
     self.assertEquals(validator.getLength(), fixedlength)