Beispiel #1
0
    def test_integerListAdd_whenValueNotInteger_shouldRaise(self):
        il = IntegerList()

        with self.assertRaises(Exception) as context:
            il.add({})

        self.assertIsNotNone(context.exception)
Beispiel #2
0
    def test_integerListAdd_whenValueIsInteger_shouldBeAdded(self):
        il = IntegerList()
        il.add(1)

        self.assertListEqual([1], il.get_data())