module TestUtils.TestCases
( AppType(..)
, InputTypeAbleFSS(..)
, TestCollectorInputType(..)
, TestCollectorOutputType(..)
, TestCollectorScenario(..)
, TestDataType(..)
, TestInputType(..)
, TestOutputType(..)
, TestScenarioCohort(..)
, createCollectorTests
, createTestsCartesian
) where
import Test.Tasty (TestTree, testGroup)
import TestUtils.S3Utils
data AppType = AppRowWise | AppColumnWise
data TestDataType = TestDataEmpty | TestDataSmall | TestDataManySubj | TestDataManyEvent
data TestInputType = TestInputFile | TestInputStdin | TestInputS3
data TestOutputType = TestOutputFile | TestOutputStdout | TestOutputS3
data TestCollectorInputType = TestCollectorInputFile | TestCollectorInputS3
data TestCollectorOutputType =
TestCollectorOutputFile
| TestCollectorOutputStdout
| TestCollectorOutputS3
data TestScenarioFilter = TestScenarioFilter
{ TestScenarioFilter -> TestDataType
getFilterTestDataType :: TestDataType
, TestScenarioFilter -> TestInputType
getFilterTestInputType :: TestInputType
}
data TestScenarioCohort = TestScenarioCohort
{ TestScenarioCohort -> AppType
getCohortAppType :: AppType
, TestScenarioCohort -> TestDataType
getCohortTestDataType :: TestDataType
, TestScenarioCohort -> TestInputType
getCohortTestInputType :: TestInputType
, TestScenarioCohort -> TestOutputType
getCohortTestOutputType :: TestOutputType
}
data TestCollectorScenario = TestCollectorScenario
{ TestCollectorScenario -> AppType
getTestCollectorAppType :: AppType
, TestCollectorScenario -> TestCollectorInputType
getTestCollectorInputType :: TestCollectorInputType
, TestCollectorScenario -> TestCollectorOutputType
getTestCollectorOutputType :: TestCollectorOutputType
}
class InputTypeAbleFSS a where
:: a -> TestInputType
instance InputTypeAbleFSS TestScenarioCohort where
extractTestInputType :: TestScenarioCohort -> TestInputType
extractTestInputType = TestScenarioCohort -> TestInputType
getCohortTestInputType
createTestsCartesian :: String -> (TestScenarioCohort -> TestTree) -> TestTree
createTestsCartesian :: String -> (TestScenarioCohort -> TestTree) -> TestTree
createTestsCartesian String
testName TestScenarioCohort -> TestTree
appTest = String -> [TestTree] -> TestTree
testGroup
String
testName
[ AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataEmpty TestInputType
TestInputFile TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataEmpty TestInputType
TestInputFile TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataEmpty TestInputType
TestInputFile TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataEmpty TestInputType
TestInputStdin TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataEmpty TestInputType
TestInputStdin TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataEmpty TestInputType
TestInputStdin TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataEmpty TestInputType
TestInputS3 TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataEmpty TestInputType
TestInputS3 TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataEmpty TestInputType
TestInputS3 TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataSmall TestInputType
TestInputFile TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataSmall TestInputType
TestInputFile TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataSmall TestInputType
TestInputFile TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataSmall TestInputType
TestInputStdin TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataSmall TestInputType
TestInputStdin TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataSmall TestInputType
TestInputStdin TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataSmall TestInputType
TestInputS3 TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataSmall TestInputType
TestInputS3 TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataSmall TestInputType
TestInputS3 TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManySubj TestInputType
TestInputFile TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManySubj TestInputType
TestInputFile TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManySubj TestInputType
TestInputFile TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManySubj TestInputType
TestInputStdin TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManySubj TestInputType
TestInputStdin TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManySubj TestInputType
TestInputStdin TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManySubj TestInputType
TestInputS3 TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManySubj TestInputType
TestInputS3 TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManySubj TestInputType
TestInputS3 TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManyEvent TestInputType
TestInputFile TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManyEvent TestInputType
TestInputFile TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManyEvent TestInputType
TestInputFile TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManyEvent TestInputType
TestInputStdin TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManyEvent TestInputType
TestInputStdin TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManyEvent TestInputType
TestInputStdin TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManyEvent TestInputType
TestInputS3 TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManyEvent TestInputType
TestInputS3 TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppRowWise TestDataType
TestDataManyEvent TestInputType
TestInputS3 TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataEmpty TestInputType
TestInputFile TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataEmpty TestInputType
TestInputFile TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataEmpty TestInputType
TestInputFile TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataEmpty TestInputType
TestInputStdin TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataEmpty TestInputType
TestInputStdin TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataEmpty TestInputType
TestInputStdin TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataEmpty TestInputType
TestInputS3 TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataEmpty TestInputType
TestInputS3 TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataEmpty TestInputType
TestInputS3 TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataSmall TestInputType
TestInputFile TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataSmall TestInputType
TestInputFile TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataSmall TestInputType
TestInputFile TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataSmall TestInputType
TestInputStdin TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataSmall TestInputType
TestInputStdin TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataSmall TestInputType
TestInputStdin TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataSmall TestInputType
TestInputS3 TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataSmall TestInputType
TestInputS3 TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataSmall TestInputType
TestInputS3 TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManySubj TestInputType
TestInputFile TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManySubj TestInputType
TestInputFile TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManySubj TestInputType
TestInputFile TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManySubj TestInputType
TestInputStdin TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManySubj TestInputType
TestInputStdin TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManySubj TestInputType
TestInputStdin TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManySubj TestInputType
TestInputS3 TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManySubj TestInputType
TestInputS3 TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManySubj TestInputType
TestInputS3 TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManyEvent TestInputType
TestInputFile TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManyEvent TestInputType
TestInputFile TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManyEvent TestInputType
TestInputFile TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManyEvent TestInputType
TestInputStdin TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManyEvent TestInputType
TestInputStdin TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManyEvent TestInputType
TestInputStdin TestOutputType
TestOutputS3
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManyEvent TestInputType
TestInputS3 TestOutputType
TestOutputFile
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManyEvent TestInputType
TestInputS3 TestOutputType
TestOutputStdout
, AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestDataType
TestDataManyEvent TestInputType
TestInputS3 TestOutputType
TestOutputS3
]
where
appTestWrp :: AppType
-> TestDataType -> TestInputType -> TestOutputType -> TestTree
appTestWrp AppType
appType TestDataType
testDataType TestInputType
testInputType TestOutputType
testOutputType = TestScenarioCohort -> TestTree
appTest
(AppType
-> TestDataType
-> TestInputType
-> TestOutputType
-> TestScenarioCohort
TestScenarioCohort AppType
appType TestDataType
testDataType TestInputType
testInputType TestOutputType
testOutputType)
createCollectorTests
:: String -> (TestCollectorScenario -> TestTree) -> TestTree
createCollectorTests :: String -> (TestCollectorScenario -> TestTree) -> TestTree
createCollectorTests String
testName TestCollectorScenario -> TestTree
appTest = String -> [TestTree] -> TestTree
testGroup
String
testName
[ AppType
-> TestCollectorInputType -> TestCollectorOutputType -> TestTree
appTestWrp AppType
AppRowWise TestCollectorInputType
TestCollectorInputFile TestCollectorOutputType
TestCollectorOutputFile
, AppType
-> TestCollectorInputType -> TestCollectorOutputType -> TestTree
appTestWrp AppType
AppRowWise TestCollectorInputType
TestCollectorInputFile TestCollectorOutputType
TestCollectorOutputStdout
, AppType
-> TestCollectorInputType -> TestCollectorOutputType -> TestTree
appTestWrp AppType
AppRowWise TestCollectorInputType
TestCollectorInputFile TestCollectorOutputType
TestCollectorOutputS3
, AppType
-> TestCollectorInputType -> TestCollectorOutputType -> TestTree
appTestWrp AppType
AppRowWise TestCollectorInputType
TestCollectorInputS3 TestCollectorOutputType
TestCollectorOutputFile
, AppType
-> TestCollectorInputType -> TestCollectorOutputType -> TestTree
appTestWrp AppType
AppRowWise TestCollectorInputType
TestCollectorInputS3 TestCollectorOutputType
TestCollectorOutputStdout
, AppType
-> TestCollectorInputType -> TestCollectorOutputType -> TestTree
appTestWrp AppType
AppRowWise TestCollectorInputType
TestCollectorInputS3 TestCollectorOutputType
TestCollectorOutputS3
, AppType
-> TestCollectorInputType -> TestCollectorOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestCollectorInputType
TestCollectorInputFile TestCollectorOutputType
TestCollectorOutputFile
, AppType
-> TestCollectorInputType -> TestCollectorOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestCollectorInputType
TestCollectorInputFile TestCollectorOutputType
TestCollectorOutputStdout
, AppType
-> TestCollectorInputType -> TestCollectorOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestCollectorInputType
TestCollectorInputFile TestCollectorOutputType
TestCollectorOutputS3
, AppType
-> TestCollectorInputType -> TestCollectorOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestCollectorInputType
TestCollectorInputS3 TestCollectorOutputType
TestCollectorOutputFile
, AppType
-> TestCollectorInputType -> TestCollectorOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestCollectorInputType
TestCollectorInputS3 TestCollectorOutputType
TestCollectorOutputStdout
, AppType
-> TestCollectorInputType -> TestCollectorOutputType -> TestTree
appTestWrp AppType
AppColumnWise TestCollectorInputType
TestCollectorInputS3 TestCollectorOutputType
TestCollectorOutputS3
]
where
appTestWrp :: AppType
-> TestCollectorInputType -> TestCollectorOutputType -> TestTree
appTestWrp AppType
appType TestCollectorInputType
inputType TestCollectorOutputType
outputType =
TestCollectorScenario -> TestTree
appTest (AppType
-> TestCollectorInputType
-> TestCollectorOutputType
-> TestCollectorScenario
TestCollectorScenario AppType
appType TestCollectorInputType
inputType TestCollectorOutputType
outputType)