------------------------------------------------------------------------------
tests :: Test
tests = testGroup "Auth type tests" [
    testCase     "Password serialization"          dontSerializeClearText
  , testCase     "Fill in [] roles"                deserializeDefaultRoles
  , testCase     "Fail deserialization"            failDeserialize
  , testProperty "AuthFailure show instances"      authFailureShows
  , testProperty "Encrypt agrees with password"    encryptByteString
  , testCase     "Reject clear encrypted pw check" rejectCheckClearText
  , testCase     "Test Role Show instance"         $ showTestCase (A.Role "a")
  , testCase     "Test Role Read instance"         $ readTestCase (A.Role "a")
  , testCase     "Test Role Ord  instance"         $
    ordTestCase (A.Role "a") (A.Role "b")
  , testCase     "Test PW Show instance"           $
    showTestCase (A.ClearText "pw")
  , testCase     "Test PW Read instance"           $
    readTestCase (A.ClearText "pw")
  , testCase     "Test PW Ord  instance"           $
    ordTestCase (A.ClearText "a") (A.ClearText "b")
  , testCase     "Test AuthFailure Eq instance"    $
    eqTestCase A.BackendError A.DuplicateLogin --TODO better as property
  , testCase     "Test AuthFailure Show instance"  $
    showTestCase A.BackendError
--  , testCase     "Test AuthFailure Read instance"  $
--    readTestCase BackendError -- TODO/NOTE: show . read isn't id for
  , testCase     "Test AuthFailure Ord instance"   $
    ordTestCase A.BackendError A.DuplicateLogin
  , testCase     "Test UserId Show instance"       $
    showTestCase (A.UserId "1")
  , testCase     "Test UserId Read instance"       $
    readTestCase (A.UserId "2")
  , testCase     "Test AuthUser Show instance"     $
    showTestCase A.defAuthUser
  , testCase     "Test AuthUser Eq instance"       $
    eqTestCase A.defAuthUser A.defAuthUser
  ]
tests :: Test
tests = testGroup "Auth type tests" [
    testCase     "Password serialization"          dontSerializeClearText
  , testCase     "Fill in [] roles"                deserializeDefaultRoles
  , testCase     "Fail deserialization"            failDeserialize
  , testProperty "AuthFailure show instances"      authFailureShows
  , testProperty "Encrypt agrees with password"    encryptByteString
  , testCase     "Reject clear encrypted pw check" rejectCheckClearText
  , testCase     "Test Role Show instance"         $ showTestCase (A.Role "a")
  , testCase     "Test Role Read instance"         $ readTestCase (A.Role "a")
  , testCase     "Test Role Ord  instance"         $
    ordTestCase (A.Role "a") (A.Role "b")
  , testCase     "Test PW Show instance"           $
    showTestCase (A.ClearText "pw")
  , testCase     "Test PW Read instance"           $
    readTestCase (A.ClearText "pw")
  , testCase     "Test PW Ord  instance"           $
    ordTestCase (A.ClearText "a") (A.ClearText "b")
  , testCase     "Test AuthFailure Eq instance"    $
    eqTestCase A.BackendError A.DuplicateLogin --TODO better as property
  , testCase     "Test AuthFailure Show instance"  $
    showTestCase A.BackendError
--  , testCase     "Test AuthFailure Read instance"  $
--    readTestCase BackendError -- TODO/NOTE: show . read isn't id for
  , testCase     "Test AuthFailure Ord instance"   $
    ordTestCase A.BackendError A.DuplicateLogin
  , testCase     "Test UserId Show instance"       $
    showTestCase (A.UserId "1")
  , testCase     "Test UserId Read instance"       $
    readTestCase (A.UserId "2")
  , testCase     "Test AuthUser Show instance"     $
    showTestCase A.defAuthUser
  , testCase     "Test AuthUser Eq instance"       $
    eqTestCase A.defAuthUser A.defAuthUser
  ]
tests = testGroup "Auth type tests" [
    testCase     "Password serialization"          dontSerializeClearText
  , testCase     "Fill in [] roles"                deserializeDefaultRoles
  , testCase     "Fail deserialization"            failDeserialize
  , testProperty "AuthFailure show instances"      authFailureShows
  , testProperty "Encrypt agrees with password"    encryptByteString
  , testCase     "Reject clear encrypted pw check" rejectCheckClearText
  , testCase     "Test Role Show instance"         $ showTestCase (A.Role "a")
  , testCase     "Test Role Read instance"         $ readTestCase (A.Role "a")
  , testCase     "Test Role Ord  instance"         $
    ordTestCase (A.Role "a") (A.Role "b")
  , testCase     "Test PW Show instance"           $
    showTestCase (A.ClearText "pw")
  , testCase     "Test PW Read instance"           $
    readTestCase (A.ClearText "pw")
  , testCase     "Test PW Ord  instance"           $
    ordTestCase (A.ClearText "a") (A.ClearText "b")
  , testCase     "Test AuthFailure Eq instance"    $
    eqTestCase A.BackendError A.DuplicateLogin --TODO better as property
  , testCase     "Test AuthFailure Show instance"  $
    showTestCase A.BackendError
--  , testCase     "Test AuthFailure Read instance"  $
--    readTestCase BackendError -- TODO/NOTE: show . read isn't id for
  , testCase     "Test AuthFailure Ord instance"   $
    ordTestCase A.BackendError A.DuplicateLogin
  , testCase     "Test UserId Show instance"       $
    showTestCase (A.UserId "1")
  , testCase     "Test UserId Read instance"       $
    readTestCase (A.UserId "2")
  , testCase     "Test AuthUser Show instance"     $
    showTestCase A.defAuthUser
  , testCase     "Test AuthUser Eq instance"       $
    eqTestCase A.defAuthUser A.defAuthUser
  ]