{-# LANGUAGE DeriveGeneric #-}
module Buffet.Test.TestResult
( TestResult(..)
) where
import qualified Buffet.Toolbox.TextTools as TextTools
import qualified Data.Aeson as Aeson
import qualified Data.Text as T
import qualified GHC.Generics as Generics
import Prelude (Bool, Eq, Maybe, Ord, Show)
data TestResult =
TestResult
{ TestResult -> Text
optionValue :: T.Text
, TestResult -> Maybe Bool
healthCheckPassed :: Maybe Bool
}
deriving (TestResult -> TestResult -> Bool
(TestResult -> TestResult -> Bool)
-> (TestResult -> TestResult -> Bool) -> Eq TestResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TestResult -> TestResult -> Bool
$c/= :: TestResult -> TestResult -> Bool
== :: TestResult -> TestResult -> Bool
$c== :: TestResult -> TestResult -> Bool
Eq, (forall x. TestResult -> Rep TestResult x)
-> (forall x. Rep TestResult x -> TestResult) -> Generic TestResult
forall x. Rep TestResult x -> TestResult
forall x. TestResult -> Rep TestResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TestResult x -> TestResult
$cfrom :: forall x. TestResult -> Rep TestResult x
Generics.Generic, Eq TestResult
Eq TestResult
-> (TestResult -> TestResult -> Ordering)
-> (TestResult -> TestResult -> Bool)
-> (TestResult -> TestResult -> Bool)
-> (TestResult -> TestResult -> Bool)
-> (TestResult -> TestResult -> Bool)
-> (TestResult -> TestResult -> TestResult)
-> (TestResult -> TestResult -> TestResult)
-> Ord TestResult
TestResult -> TestResult -> Bool
TestResult -> TestResult -> Ordering
TestResult -> TestResult -> TestResult
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: TestResult -> TestResult -> TestResult
$cmin :: TestResult -> TestResult -> TestResult
max :: TestResult -> TestResult -> TestResult
$cmax :: TestResult -> TestResult -> TestResult
>= :: TestResult -> TestResult -> Bool
$c>= :: TestResult -> TestResult -> Bool
> :: TestResult -> TestResult -> Bool
$c> :: TestResult -> TestResult -> Bool
<= :: TestResult -> TestResult -> Bool
$c<= :: TestResult -> TestResult -> Bool
< :: TestResult -> TestResult -> Bool
$c< :: TestResult -> TestResult -> Bool
compare :: TestResult -> TestResult -> Ordering
$ccompare :: TestResult -> TestResult -> Ordering
$cp1Ord :: Eq TestResult
Ord, Int -> TestResult -> ShowS
[TestResult] -> ShowS
TestResult -> String
(Int -> TestResult -> ShowS)
-> (TestResult -> String)
-> ([TestResult] -> ShowS)
-> Show TestResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TestResult] -> ShowS
$cshowList :: [TestResult] -> ShowS
show :: TestResult -> String
$cshow :: TestResult -> String
showsPrec :: Int -> TestResult -> ShowS
$cshowsPrec :: Int -> TestResult -> ShowS
Show)
instance Aeson.ToJSON TestResult where
toJSON :: TestResult -> Value
toJSON = Options -> TestResult -> Value
forall a.
(Generic a, GToJSON' Value Zero (Rep a)) =>
Options -> a -> Value
Aeson.genericToJSON Options
TextTools.defaultJsonOptions