Add test for vararg options

This commit is contained in:
Hugo Duncan 2010-09-17 15:57:50 -04:00
parent 5b16a80d2d
commit 16d14e82cc
1 changed files with 5 additions and 0 deletions

View File

@ -67,5 +67,10 @@ list, Alan Dipert and MeikelBrandmeyer."
(is (= OsFamily/CENTOS (is (= OsFamily/CENTOS
(-> (build-template service {:os-family :centos}) (-> (build-template service {:os-family :centos})
bean :image bean :operatingSystem bean :family)))) bean :image bean :operatingSystem bean :family))))
(testing "varags"
(is (java.util.Arrays/equals
(int-array [22 8080])
(-> (build-template service {:inbound-ports [22 8080]})
bean :options bean :inboundPorts))))
(testing "invalid" (testing "invalid"
(is (thrown? Condition (build-template service {:xx :yy})))))) (is (thrown? Condition (build-template service {:xx :yy}))))))