Commit f70d635d authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] adding some examples for mock.

parent 1e72c415
...@@ -76,11 +76,19 @@ data HyperdataDocument = HyperdataDocument { hyperdataDocument_bdd ...@@ -76,11 +76,19 @@ data HyperdataDocument = HyperdataDocument { hyperdataDocument_bdd
} deriving (Show, Generic) } deriving (Show, Generic)
$(deriveJSON (unPrefix "hyperdataDocument_") ''HyperdataDocument) $(deriveJSON (unPrefix "hyperdataDocument_") ''HyperdataDocument)
toHyperdataDocuments :: [(Text, Text)] -> [HyperdataDocument]
toHyperdataDocuments ts = map (\(t1,t2) -> HyperdataDocument Nothing Nothing Nothing Nothing (Just t1)
Nothing (Just t2) Nothing Nothing Nothing
Nothing Nothing Nothing Nothing Nothing Nothing
) ts
hyperdataDocuments :: [HyperdataDocument] hyperdataDocuments :: [HyperdataDocument]
hyperdataDocuments = [HyperdataDocument Nothing Nothing Nothing Nothing (Just "AI is big but less than crypto") hyperdataDocuments = toHyperdataDocuments [ ("AI is big but less than crypto", "Troll System journal")
Nothing (Just "Troll System journal") Nothing Nothing Nothing , ("Crypto is big but less than AI", "System Troll review" )
Nothing Nothing Nothing Nothing Nothing Nothing , ("Science is magic" , "Closed Source review")
] , ("Open science for all" , "No Time" )
, ("Closed science for me" , "No Space" )
]
instance Arbitrary HyperdataDocument where instance Arbitrary HyperdataDocument where
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment