Пример #1
0
 def randomItem(self):
     """ method returns a random item, using the itemFactory method
         Precondition: None
         Postcondition: returns random Item """
     return Factory.itemFactory().create()
Пример #2
0
def test_artifact_room_class_and_methods():
    item = Factory.itemFactory()
    ar = ArtifactRoom(2, 2, ["text"], item=item)
    x, y = ar.getCoords()
    desc = ar.getText()
    assert (x == 2 and y == 2 and desc == "text")