forked from microsoft/coyote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
41 lines (34 loc) · 1.06 KB
/
Program.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
36
37
38
39
40
41
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
using System.Threading.Tasks;
using Microsoft.Coyote.Runtime;
using Microsoft.Coyote.Samples.Common;
using Microsoft.Coyote.Specifications;
namespace Microsoft.Coyote.Samples.CoffeeMachineTasks
{
public static class Program
{
private static bool RunForever = false;
public static void Main()
{
RunForever = true;
LogWriter.Initialize();
_ = RunTest();
Console.ReadLine();
Console.WriteLine("User cancelled the test by pressing ENTER");
}
[Microsoft.Coyote.SystematicTesting.Test]
public static async Task Execute(ICoyoteRuntime runtime)
{
LogWriter.Initialize(runtime.Logger);
Specification.RegisterMonitor<LivenessMonitor>();
await RunTest();
}
private static async Task RunTest()
{
IFailoverDriver driver = new FailoverDriver(RunForever);
await driver.RunTest();
}
}
}