Esempio n. 1
0
 def TestClass_NoKwargsGiven_SetExpectedInstanceAttrs(self):
     image = dummy_image()
     entity = Entity(image)
     assert entity.name == ''
     assert entity.walkable == False
     assert entity.action == None
     assert entity.facing == (0, -1)
     assert entity.id == None
     assert entity.tile_x == 0
     assert entity.tile_y == 0
     assert entity.tile_z == 0
Esempio n. 2
0
 def TestClass_AllArgsGiven_SetExpectedInstanceAttrs(self):
     image = dummy_image()
     name = 'Dude'
     walkable = False
     action = object()
     facing = (1, 0)
     id = 'thedude'
     x = 1
     y = 2
     z = 3
     entity = Entity(image, name, walkable, action, facing, id, x, y, z)
     assert entity.name == name
     assert entity.walkable == walkable
     assert entity.action == action
     assert entity.facing == facing
     assert entity.id == id
     assert entity.tile_x == x
     assert entity.tile_y == y
     assert entity.tile_z == z