Skip to content

Commit 10296f5

Browse files
changed the tests in password-checker, removed theory tag (#1372)
1 parent 21743d7 commit 10296f5

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

exercises/concept/password-checker/PasswordCheckerTests.fs

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,31 @@ let ``Error when password has no symbols`` () =
3636
let expected: Result<string, PasswordError> = Error MissingSymbol
3737
checkPassword "abcd3fghijkL" |> should equal expected
3838

39-
[<Theory>]
40-
[<InlineData("!1abcdefghiJ")>]
41-
[<InlineData("@2KLMNOPQRSt")>]
42-
[<InlineData("$4abcdefghiJ")>]
43-
[<InlineData("&7KLMNOPQRSt")>]
39+
[<Fact>]
40+
[<Task(1)>]
41+
let ``Ok when password is good with exclamation mark`` () =
42+
let password = "!1abcdefghiJ"
43+
let expected: Result<string, PasswordError> = Ok password
44+
checkPassword password |> should equal expected
45+
46+
[<Fact>]
47+
[<Task(1)>]
48+
let ``Ok when password is good with at symbol`` () =
49+
let password = "@2KLMNOPQRSt"
50+
let expected: Result<string, PasswordError> = Ok password
51+
checkPassword password |> should equal expected
52+
53+
[<Fact>]
54+
[<Task(1)>]
55+
let ``Ok when password is good with dollar sign`` () =
56+
let password = "$4abcdefghiJ"
57+
let expected: Result<string, PasswordError> = Ok password
58+
checkPassword password |> should equal expected
59+
60+
[<Fact>]
4461
[<Task(1)>]
45-
let ``Ok when password is good`` (password: string) =
62+
let ``Ok when password is good with ampersand`` () =
63+
let password = "&7KLMNOPQRSt"
4664
let expected: Result<string, PasswordError> = Ok password
4765
checkPassword password |> should equal expected
4866

0 commit comments

Comments
 (0)