Esempio n. 1
0
class FixedIntegerProviderTest(unittest.TestCase):
  """Test class for FixedIntegerProvider.
  """

  def setUp(self):
    self.provider = FixedIntegerProvider()

  def tearDown(self):
    pass

  def testGetValue(self):
    """Tests FixedIntegerProvider.getValue()
    """
    value = 5
    self.provider.param_values = {'value': value}
    self.assertEquals(self.provider.getValue(), value)

  def testGetValueWithInvalidParameters(self):
    """Tests getValue() with an invalid integer value.
    """
    value = 'asdf'
    self.provider.param_values = {'value': value}
    self.assertRaises(ParameterValueError, self.provider.getValue)
Esempio n. 2
0
 def setUp(self):
   self.provider = FixedIntegerProvider()