mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 04:12:13 +00:00
20 lines
483 B
Forth
20 lines
483 B
Forth
module GildedRose.ApprovalTests
|
|
|
|
open System
|
|
open Xunit
|
|
open System.Text
|
|
open System.IO
|
|
|
|
[<Fact>]
|
|
let ``Thirty day report is correct`` () =
|
|
let expected = File.ReadAllText "GildedRoseTest.ApprovalTest.ThirtyDays.received.txt"
|
|
|
|
let fakeoutput = new StringBuilder()
|
|
Console.SetOut(new StringWriter(fakeoutput))
|
|
Console.SetIn(new StringReader("a\n"))
|
|
|
|
GildedRose.Program.main [||] |> ignore
|
|
let actual = fakeoutput.ToString()
|
|
|
|
Assert.Equal(expected, actual)
|