module GridMethodTests.UnitTests

open GridMethod
open NUnit.Framework
open FsUnit

[<Test>]
let ``Algorithm should converge on test task data`` () =
    let targetError = 0.00001
    let initial_N = 10
    Algorithm.run TestTaskData.testTaskData initial_N targetError |> ignore

[<Test>]
let ``Actual error should be less than target error`` () =
    let targetError = 0.0001
    let initial_N = 10

    (Algorithm.run TestTaskData.testTaskData initial_N targetError).Error
    |> should lessThan targetError
