Skip to content

Commit b3dca4b

Browse files
committed
Add first tests for this
1 parent 7fe636a commit b3dca4b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/FSharp.Control.TaskSeq.Test/TaskSeq.Append.Tests.fs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ let validateSequence ts =
2323
|> Task.map (should equal "1234567891012345678910")
2424

2525
module EmptySeq =
26+
let ``Null source is invalid`` () =
27+
let test1 () = TaskSeq.empty |> TaskSeq.append null |> TaskSeq.toList
28+
let test2 () = null |> TaskSeq.append TaskSeq.empty |> TaskSeq.toList
29+
let test3 () = null |> TaskSeq.append null |> TaskSeq.toList
30+
test1 |> should throw typeof<ArgumentNullException>
31+
test2 |> should throw typeof<ArgumentNullException>
32+
test3 |> should throw typeof<ArgumentNullException>
33+
2634
[<Theory; ClassData(typeof<TestEmptyVariants>)>]
2735
let ``TaskSeq-append both args empty`` variant =
2836
Gen.getEmptyVariant variant

0 commit comments

Comments
 (0)