pyherc icon indicating copy to clipboard operation
pyherc copied to clipboard

easier testing

Open tuturto opened this issue 10 years ago • 0 comments

(test-setup default
  actions (-> (ActionFactory)
              (.build))
  character (-> (CharacterBuilder)
                (.with-name "Pete")
                (.build))
  dagger (-> (ItemBuilder)
             (.with-name "dagger")
             (.build)))

(defn test-case []
  (with-setup default [actions character]
    (move-character character actions 1)
    (assert-that character.location (is- (equal-to #t(2 2))))))

(defn test-another-case []
  (with-setup default [actions character dagger]
    (pick-up character dagger actions)
    (assert-that character (has-item dagger))))

tuturto avatar Aug 13 '15 10:08 tuturto