Exemplo n.º 1
0
class LessThanEqualMatcherTest(unittest.TestCase):
    def setUp(self):
        self.matcher = LessThanEqualMatcher(7)

    def test_should_return_true_when_matching_value_less_than_expected(self):
        self.assertTrue(self.matcher.matches(6))

    def test_should_return_true_when_matching_value_equal_than_expected(self):
        self.assertTrue(self.matcher.matches(7))

    def test_should_return_false_when_matching_value_greater_than_expected(self):
        self.assertFalse(self.matcher.matches(8))

    def test_should_provide_description(self):
        self.assertEquals("Actual '8' is not less than or equal to '7'", self.matcher.describe(8))
Exemplo n.º 2
0
class LessThanEqualMatcherTest(unittest.TestCase):
    def setUp(self):
        self.matcher = LessThanEqualMatcher(7)

    def test_should_return_true_when_matching_value_less_than_expected(self):
        self.assertTrue(self.matcher.matches(6))

    def test_should_return_true_when_matching_value_equal_than_expected(self):
        self.assertTrue(self.matcher.matches(7))

    def test_should_return_false_when_matching_value_greater_than_expected(
            self):
        self.assertFalse(self.matcher.matches(8))

    def test_should_provide_description(self):
        self.assertEquals("Actual '8' is not less than or equal to '7'",
                          self.matcher.describe(8))
Exemplo n.º 3
0
 def setUp(self):
     self.matcher = LessThanEqualMatcher(7)
Exemplo n.º 4
0
 def setUp(self):
     self.matcher = LessThanEqualMatcher(7)