cljpyoung.address-plate
- I don't want to throw Exception.
Usage
[netpyoung/cljpyoung.address-plate "0.1.0"]
(require '[cljpyoung.address-plate :as address-plate])
(deftest simple-route
(address-plate/reset!)
(route hello)
(defn hello [message] (str "hello-" message))
(route world)
(defn world [message] message)
(testing "dispatch-by-key"
(is (= "hello-message"
(dispatch! "message" :key :hello))))
(testing "dispatch-by-key-fn"
(is (= "message"
(dispatch! "message" :key-fn (constantly :world))))))
Ref:
License
Copyright © 2018 netpyoung
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.