-
Notifications
You must be signed in to change notification settings - Fork 1
/
Test.cs
35 lines (30 loc) · 953 Bytes
/
Test.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
namespace example_csharp_licensing_Docker;
public class Test
{
private readonly ITestOutputHelper _consoleOutput;
public Test(ITestOutputHelper consoleOutput)
{
_consoleOutput = consoleOutput;
}
[Fact]
public void UnitTest()
{
// Definition of all constant and variables needed to test
var stringWriter = new StringWriter();
Console.SetOut(stringWriter);
// Run the application
MachineFile.Verification(
new[]
{
"examples/license.lic",
"examples/machine.lic",
"198e9fe586114844f6a4eaca5069b41a7ed43fb5a2df84892b69826d64573e39"
}
);
// Assert the output is what we expected
var output = stringWriter.ToString();
_consoleOutput.WriteLine(output);
const string expectedOutput = "Hello, World!";
Assert.Contains(expectedOutput, output);
}
}