Files
WoofWare.NUnitTestRunner/Consumer/TestAppDomain.fs
2024-06-06 20:50:48 +01:00

24 lines
560 B
Forth

namespace Consumer
open System
open FsUnitTyped
open System.IO
open NUnit.Framework
[<TestFixture>]
module TestAppDomain =
[<Test>]
let ``Can load config from app domain`` () =
Path.Combine (AppDomain.CurrentDomain.BaseDirectory, "some-config.json")
|> File.ReadAllText
|> fun s -> s.Trim ()
|> shouldEqual """{"hi":"bye"}"""
[<Test>]
let ``Can load config from working dir`` () =
"some-config.json"
|> File.ReadAllText
|> fun s -> s.Trim ()
|> shouldEqual """{"hi":"bye"}"""