(ns book.exchange-test (:require [midje.sweet :refer :all] [book.exchange :refer :all] [book.match :refer [create-buy-book create-sell-book]] [clojure.core.async :refer [chan go >!! !! incoming-order-channel {:type :sell :quantity 10 :price 2}) ( {:type :sell :quantity 10 :price 2} (>!! incoming-order-channel {:type :buy :quantity 20 :price 2}) ( #:book.order{:book-id nil :order-id nil :price 2 :quantity 10 :type :sell} ( {:type :buy :quantity 10 :price 2})))