using FinRua
using Test 


@testset "FinRua.jl" begin

    @test FP(2,5) == 243
    @test FP(2.5,10) == 275854.7353515625
    @test FP(0.55,2) == 2.4025000000000003
    @test FP(0.55,0.100) == 1.0448000141602642

    @test AP(1,3) == 1.1428571428571428
    @test AP(0.59,6.66) == 0.6181711030140463
    @test AP(0.9,0.99) ==  1.9136917882003834
    @test AP(1.555,8) == 1.555856726826602

    @test PF(0.59,6.66) == 0.04557169184501054
    @test PF(0.9,0.99) ==  0.5297048325392298
    @test PF(1.555,8) == 0.0005506463492620611

    @test FA(0.59,6.66) == 35.49736762175731
    @test FA(0.9,0.99) ==  0.9864931448002647
    @test FA(1.555,8) ==  1167.233205438878

    @test PA(0.59,6.66) == 1.6176750985677788
    @test PA(0.9,0.99) ==  0.5225501860675223
    @test PA(1.555,8) ==  0.6427327033123716

end
