forked from microsoft/coyote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTest.cs
37 lines (31 loc) · 1.23 KB
/
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
36
37
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
using Microsoft.Coyote;
using Microsoft.Coyote.Actors;
using Microsoft.Coyote.Samples.Common;
namespace Coyote.Examples.Timers
{
public static class Program
{
public static void Main()
{
// Optional: increases verbosity level to see the Coyote runtime log and sets it to output to the console.
// var configuration = Configuration.Create();
var configuration = Configuration.Create().WithVerbosityEnabled().WithConsoleLoggingEnabled();
// Creates a new Coyote runtime instance, and passes an optional configuration.
var runtime = RuntimeFactory.Create(configuration);
// Executes the Coyote program.
Execute(runtime);
// The Coyote runtime executes asynchronously, so we wait
// here until user presses ENTER key before terminating the program.
Console.ReadLine();
}
[Microsoft.Coyote.SystematicTesting.Test]
public static void Execute(IActorRuntime runtime)
{
LogWriter.Initialize(runtime.Logger);
runtime.CreateActor(typeof(TimerSample));
}
}
}