-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make unit tests buildable and passing on .NET Core
- Loading branch information
Stephen Jennings
committed
Jun 16, 2017
1 parent
1d5009c
commit 3e6d8b6
Showing
7 changed files
with
54 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 0 additions & 36 deletions
36
src/Turbocharged.Beanstalk.Tests/Properties/AssemblyInfo.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Microsoft.Extensions.Configuration; | ||
using System; | ||
using System.IO; | ||
|
||
namespace Turbocharged.Beanstalk.Tests | ||
{ | ||
public static class Settings | ||
{ | ||
static IConfigurationRoot Configuration { get; } = | ||
new ConfigurationBuilder() | ||
.SetBasePath(Directory.GetCurrentDirectory()) | ||
.AddJsonFile("settings.json") | ||
.Build(); | ||
|
||
public static string BeanstalkHostName | ||
{ | ||
get | ||
{ | ||
var fromEnv = Environment.GetEnvironmentVariable("BEANSTALK_HOSTNAME"); | ||
return fromEnv ?? Configuration["beanstalk.hostname"]; | ||
} | ||
} | ||
|
||
public static int BeanstalkPort | ||
{ | ||
get | ||
{ | ||
var fromEnv = Environment.GetEnvironmentVariable("BEANSTALK_PORT"); | ||
return int.Parse(fromEnv ?? Configuration["beanstalk.port"]); | ||
} | ||
} | ||
} | ||
} |
13 changes: 12 additions & 1 deletion
13
src/Turbocharged.Beanstalk.Tests/Turbocharged.Beanstalk.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,24 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp1.1</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="1.1.2" /> | ||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="1.1.2" /> | ||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.2" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" /> | ||
<PackageReference Include="xunit" Version="2.2.0" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Turbocharged.Beanstalk\Turbocharged.Beanstalk.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Include="settings.json" CopyToOutputDirectory="PreserveNewest" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"beanstalk.hostname": "localhost", | ||
"beanstalk.port": 11300 | ||
} |