module LargestSeriesProductTest open Xunit open FsUnit.Xunit open System open LargestSeriesProduct [] [] [] let ``Gets the largest product``(digits: string) (seriesLength: int) (expected: int) = largestProduct digits seriesLength |> should equal expected [] let ``Largest product works for small numbers`` () = largestProduct "19" 2 |> should equal 9 [] let ``Largest product works for large numbers`` () = let LARGE_NUMBER = "73167176531330624919225119674426574742355349194934" largestProduct LARGE_NUMBER 6 |> should equal 23520 [] [] [] let ``Largest product works if all spans contain zero``(digits: string) (seriesLength: int) (expected: int) = largestProduct digits seriesLength |> should equal expected [] [] [] let ``Largest product for empty span is 1``(digits: string) (expected: int) = largestProduct digits 0 |> should equal expected [] let ``Cannot slice empty string with nonzero span`` () = (fun () -> largestProduct "" 1 |> ignore) |> should throw typeof