Open satchit8 opened 7 years ago
After reading more of the existing tests, I see that using multiple let blocks within a single deftest seems to be preferred. So may be the following is more appropraite:
(deftest config
(let [v (ui/make-ui RuntimeEnvironment/application [:button {:text "hello"}])]
(is (= View/VISIBLE (.getVisibility v)))
(is (= "hello" (.getText v)))
(ui/config v :text "updated" :visibility View/GONE)
(is (= "updated" (.getText v)))
(is (= View/GONE (.getVisibility v))))
(let [ll (ui/make-ui RuntimeEnvironment/application
[:linear-layout {:custom-constructor
(fn [ctx]
(proxy [LinearLayout] [ctx]))
:orientation :vertical}])]
(is (= LinearLayout/VERTICAL(.getOrientation ll)))
(ui/config ll :orientation :horizontal)
(is (= LinearLayout/HORIZONTAL (.getOrientation ll)))))
I found another use of keyword-by-classname, so here are similar modifications as with #68.