Skip to content
This repository was archived by the owner on Apr 13, 2022. It is now read-only.

Commit c870ca5

Browse files
Nick Waywoodairvin
authored andcommitted
Initial test framework.
Signed-off-by: Nick Waywood <n.waywood@gmail.com>
1 parent 9e3401d commit c870ca5

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

package.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,5 @@ tests:
8282
- -with-rtsopts=-N
8383
dependencies:
8484
- fabric-chaincode-haskell
85+
- tasty
86+
- tasty-hunit

test/Spec.hs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,17 @@
1+
import Test.Tasty
2+
import Test.Tasty.HUnit
3+
4+
import Stub
5+
16
main :: IO ()
2-
main = putStrLn "Test suite not yet implemented"
7+
main = defaultMain tests
8+
9+
tests :: TestTree
10+
tests = testGroup "Tests" [stubUnitTests]
11+
12+
stubUnitTests :: TestTree
13+
stubUnitTests = testGroup "Stub Unit Tests" [getState]
14+
15+
getTxId :: TestTree
16+
getState = testCase "getState" $ [1, 2, 3] `compare` [1, 2] @?= GT
17+
-- where stub =

0 commit comments

Comments
 (0)