Exemplo n.º 1
0
    def test_predicate_condition_2(self):
        test = NotifyTestObject()

        predicate = PredicateCondition(bool, None)
        predicate.store(test.simple_handler)

        predicate.update(False)

        test.assert_results(False)
Exemplo n.º 2
0
    def test_predicate_condition_2 (self):
        test = NotifyTestObject ()

        predicate = PredicateCondition (bool, None)
        predicate.store (test.simple_handler)

        predicate.update (False)

        test.assert_results (False)
Exemplo n.º 3
0
    def test_predicate_condition_3(self):
        test = NotifyTestObject()

        predicate = PredicateCondition(lambda x: x > 10, 0)
        predicate.store(test.simple_handler)

        predicate.update(10)
        predicate.update(20)
        predicate.update(-5)

        test.assert_results(False, True, False)
Exemplo n.º 4
0
    def test_predicate_condition_3 (self):
        test = NotifyTestObject ()

        predicate = PredicateCondition (lambda x: x > 10, 0)
        predicate.store (test.simple_handler)

        predicate.update (10)
        predicate.update (20)
        predicate.update (-5)

        test.assert_results (False, True, False)