File: MonadClientUIUnitTests.hs

package info (click to toggle)
haskell-lambdahack 0.11.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,056 kB
  • sloc: haskell: 45,636; makefile: 219
file content (31 lines) | stat: -rw-r--r-- 1,052 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
module MonadClientUIUnitTests (monadClientUIUnitTests) where

import Prelude ()

import Game.LambdaHack.Core.Prelude

import Test.Tasty
import Test.Tasty.HUnit

import Game.LambdaHack.Client.MonadClient
import Game.LambdaHack.Client.State
import Game.LambdaHack.Client.UI.MonadClientUI
import Game.LambdaHack.Client.UI.Overlay

import UnitTestHelpers

monadClientUIUnitTests :: TestTree
monadClientUIUnitTests = testGroup "handleHumanLocalMUnitTests"
  [ testCase "getsClient sside" $ do
      sideInMonad <- executorCli (getsClient sside) stubCliState
      fst sideInMonad @?= testFactionId
  , testCase "getArenaUI works in stub" $ do
      levelIdInMonad <- executorCli getArenaUI stubCliState
      fst levelIdInMonad @?= testLevelId
  , testCase "viewedLevelUI works in stub" $ do
      levelIdInMonad <- executorCli viewedLevelUI stubCliState
      fst levelIdInMonad @?= testLevelId
  , testCase "getFontSetup works in stub" $ do
      fontSetupInMonad <- executorCli getFontSetup stubCliState
      fst fontSetupInMonad @?= multiFontSetup
  ]