Ignore:
Timestamp:
09/02/13 21:05:25 (8 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Phase:
public
Message:

Load game objects from level.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/tests/test_game_object.py

    r125 r145  
    6868        faker.fake_state = 'bar'
    6969        self.assertEqual('bar', puzzler.get_state())
     70
     71    def test_glue_add_component(self):
     72        glue = game_object.PuzzleGlue()
     73        puzzler = FakePuzzler('foo')
     74        gobj = FakeGameObject(None, None)
     75        gobj.puzzler = FakePuzzler('bar')
     76
     77        self.assertEqual({}, glue._components)
     78        glue.add_component('foo', puzzler)
     79        self.assertEqual({'foo': puzzler}, glue._components)
     80        glue.add_component('bar', gobj)
     81        self.assertEqual(
     82            {'foo': puzzler, 'bar': gobj.puzzler}, glue._components)
Note: See TracChangeset for help on using the changeset viewer.