Set AppDomain (#15)

This commit is contained in:
Patrick Stevens
2024-06-05 00:09:40 +01:00
committed by GitHub
parent 31b76f2f97
commit 247cc9fa0d
4 changed files with 57 additions and 15 deletions

View File

@@ -10,6 +10,10 @@
<ItemGroup>
<Compile Include="TestSetUp.fs" />
<Compile Include="TestValues.fs" />
<None Include="some-config.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Compile Include="TestAppDomain.fs" />
</ItemGroup>
<ItemGroup>

16
Consumer/TestAppDomain.fs Normal file
View File

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

View File

@@ -0,0 +1 @@
{"hi":"bye"}