Ejemplo n.º 1
0
    def test_getter_gets_set_values(self):
        e = Entity()
        expected = IntComponent(13)
        e.set(expected)

        actual = e.get(IntComponent)
        self.assertEqual(actual, expected)
Ejemplo n.º 2
0
    def test_set_overwrites_previous_value(self):
        e = Entity()
        expected = IntComponent(13)

        e.set(IntComponent(1888))
        e.set(expected)

        actual = e.get(IntComponent)
        self.assertEqual(actual, expected)