forked from ServiceStack/ServiceStack.OrmLite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNetCoreTestsRunner.cs
More file actions
45 lines (39 loc) · 1.65 KB
/
Copy pathNetCoreTestsRunner.cs
File metadata and controls
45 lines (39 loc) · 1.65 KB
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
using NUnitLite;
using NUnit.Common;
using System.Reflection;
using ServiceStack;
using ServiceStack.Text;
using System;
using System.Globalization;
using System.Threading;
using ServiceStack.OrmLite.Tests;
namespace ServiceStack.OrmLite.PostgreSQL.Tests
{
public class NetCoreTestsRunner
{
/// <summary>
/// The main program executes the tests. Output may be routed to
/// various locations, depending on the arguments passed.
/// </summary>
/// <remarks>Run with --help for a full list of arguments supported</remarks>
/// <param name="args"></param>
public static int Main(string[] args)
{
var licenseKey = Environment.GetEnvironmentVariable("SERVICESTACK_LICENSE");
if (licenseKey.IsNullOrEmpty())
throw new ArgumentNullException("SERVICESTACK_LICENSE", "Add Environment variable for SERVICESTACK_LICENSE");
Licensing.RegisterLicense(licenseKey);
//"ActivatedLicenseFeatures: ".Print(LicenseUtils.ActivatedLicenseFeatures());
var postgreSqlDb = Environment.GetEnvironmentVariable("POSTGRESQL_DB");
if (!String.IsNullOrEmpty(postgreSqlDb))
{
Config.PostgreSqlDb = postgreSqlDb;
}
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US");
JsConfig.InitStatics();
//JsonServiceClient client = new JsonServiceClient();
var writer = new ExtendedTextWrapper(Console.Out);
return new AutoRun(((IReflectableType)typeof(NetCoreTestsRunner)).GetTypeInfo().Assembly).Execute(args, writer, Console.In);
}
}
}