예제 #1
0
class LessThanMatcherTest(unittest.TestCase):
    def setUp(self):
        self.matcher = LessThanMatcher(7)

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

    def test_should_return_false_when_matching_value_equal_than_expected(self):
        self.assertFalse(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 '7' is not less than '7'", self.matcher.describe(7))
예제 #2
0
class LessThanMatcherTest(unittest.TestCase):
    def setUp(self):
        self.matcher = LessThanMatcher(7)

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

    def test_should_return_false_when_matching_value_equal_than_expected(self):
        self.assertFalse(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 '7' is not less than '7'",
                          self.matcher.describe(7))
예제 #3
0
 def setUp(self):
     self.matcher = LessThanMatcher(7)
예제 #4
0
 def setUp(self):
     self.matcher = LessThanMatcher(7)