如何模拟ImagePicker

时间:2019-09-26 14:42:16

标签: testing flutter camera mocking imagepicker

我使用以下软件包:image picker 现在,我有以下代码行:

evensAndOdds : List a -> ( List a, List a )
evensAndOdds input =
    case input of
        [] ->
            ( [], [] )

        [ even ] ->
            ( [ even ], [] )

        [ even, odd ] :: tail ->
            let
                ( tailEvens, tailOdds ) =
                    evensAndOdds tail
            in
            ( even :: tailEvens, odd :: tailOdds )

我想在测试中模拟,但是我找不到方法。

0 个答案:

没有答案