-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathTestServices.cs
47 lines (42 loc) · 1.34 KB
/
TestServices.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
42
43
44
45
46
47
using Meadow.Core.EthTypes;
using Meadow.JsonRpc.Client;
using Meadow.TestNode;
namespace Meadow.UnitTestTemplate
{
public class TestServices
{
#region Properties
/// <summary>
/// The current <see cref="JsonRpcClient"/> used to run tests with.
/// </summary>
public IJsonRpcClient TestNodeClient { get; }
/// <summary>
/// The <see cref="TestNodeServer"/> used to run tests against.
/// NULL if this is testing against an external node.
/// </summary>
public TestNodeServer TestNodeServer { get; }
/// <summary>
/// The cache of initially created accounts on the test node.
/// </summary>
public Address[] Accounts { get; }
/// <summary>
/// Indicates the test services are running on an external node, not provided in this object.
/// </summary>
public bool IsExternalNode
{
get
{
return TestNodeServer == null;
}
}
#endregion
#region Constructors
public TestServices(IJsonRpcClient testNodeClient, TestNodeServer testNodeServer, Address[] accounts)
{
TestNodeClient = testNodeClient;
TestNodeServer = testNodeServer;
Accounts = accounts;
}
#endregion
}
}