Skip to content

Commit

Permalink
Move tests to own folder
Browse files Browse the repository at this point in the history
Move the tests to the "tests" folder, leaving just the library in "src".
  • Loading branch information
martincostello committed Oct 13, 2018
1 parent b74ac1d commit ad8b408
Show file tree
Hide file tree
Showing 41 changed files with 30 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ addons:

install:
- git clone https://github.com/etsy/statsd.git
- node ./statsd/stats.js ./src/JustEat.StatsD.Tests/statsdconfig.js &
- node ./statsd/stats.js ./tests/JustEat.StatsD.Tests/statsdconfig.js &

script:
- ./build.sh
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"args": [
"test"
],
"cwd": "${workspaceRoot}/src/JustEat.StatsD.Tests",
"cwd": "${workspaceRoot}/tests/JustEat.StatsD.Tests",
"console": "internalConsole",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
Expand Down
2 changes: 1 addition & 1 deletion Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ $projects = @(
)

$testProjects = @(
(Join-Path $solutionPath "src\JustEat.StatsD.Tests\JustEat.StatsD.Tests.csproj")
(Join-Path $solutionPath "tests\JustEat.StatsD.Tests\JustEat.StatsD.Tests.csproj")
)

$packageProjects = @(
Expand Down
33 changes: 21 additions & 12 deletions JustEat.StatsD.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,23 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Assets", "Assets", "{06BE4D
build.sh = build.sh
CHANGELOG.md = CHANGELOG.md
CONTRIBUTING.md = CONTRIBUTING.md
global.json = global.json
Directory.Build.props = Directory.Build.props
version.props = version.props
global.json = global.json
LICENSE = LICENSE
README.md = README.md
release.ps1 = release.ps1
version.props = version.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JustEat.StatsD", "src\JustEat.StatsD\JustEat.StatsD.csproj", "{6A338D71-E28B-455A-9E9D-3667EE659542}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JustEat.StatsD.Tests", "src\JustEat.StatsD.Tests\JustEat.StatsD.Tests.csproj", "{8D9AA1A3-2619-4800-AAEC-84AE4DA15455}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{CC2F794C-462F-4545-AEEA-13E34A37528E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Benchmark", "src\Benchmark\Benchmark.csproj", "{537F16FC-D50D-4260-8B16-3C3F47A4DC4D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JustEat.StatsD.Tests", "tests\JustEat.StatsD.Tests\JustEat.StatsD.Tests.csproj", "{5E1B60D3-3F67-4753-8C6C-AC1795978A8D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Benchmark", "tests\Benchmark\Benchmark.csproj", "{4C48F92C-8F51-403B-B3DD-281C522C1C7E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{48F0CB2A-4B74-47F2-9234-18147FA389F9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -37,18 +41,23 @@ Global
{6A338D71-E28B-455A-9E9D-3667EE659542}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A338D71-E28B-455A-9E9D-3667EE659542}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A338D71-E28B-455A-9E9D-3667EE659542}.Release|Any CPU.Build.0 = Release|Any CPU
{8D9AA1A3-2619-4800-AAEC-84AE4DA15455}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D9AA1A3-2619-4800-AAEC-84AE4DA15455}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D9AA1A3-2619-4800-AAEC-84AE4DA15455}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8D9AA1A3-2619-4800-AAEC-84AE4DA15455}.Release|Any CPU.Build.0 = Release|Any CPU
{537F16FC-D50D-4260-8B16-3C3F47A4DC4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{537F16FC-D50D-4260-8B16-3C3F47A4DC4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{537F16FC-D50D-4260-8B16-3C3F47A4DC4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{537F16FC-D50D-4260-8B16-3C3F47A4DC4D}.Release|Any CPU.Build.0 = Release|Any CPU
{5E1B60D3-3F67-4753-8C6C-AC1795978A8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5E1B60D3-3F67-4753-8C6C-AC1795978A8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E1B60D3-3F67-4753-8C6C-AC1795978A8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5E1B60D3-3F67-4753-8C6C-AC1795978A8D}.Release|Any CPU.Build.0 = Release|Any CPU
{4C48F92C-8F51-403B-B3DD-281C522C1C7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C48F92C-8F51-403B-B3DD-281C522C1C7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C48F92C-8F51-403B-B3DD-281C522C1C7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C48F92C-8F51-403B-B3DD-281C522C1C7E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{6A338D71-E28B-455A-9E9D-3667EE659542} = {48F0CB2A-4B74-47F2-9234-18147FA389F9}
{5E1B60D3-3F67-4753-8C6C-AC1795978A8D} = {CC2F794C-462F-4545-AEEA-13E34A37528E}
{4C48F92C-8F51-403B-B3DD-281C522C1C7E} = {CC2F794C-462F-4545-AEEA-13E34A37528E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {72443623-DCE7-43AB-A24E-1D08807E1F72}
EndGlobalSection
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ environment:
NUGET_XMLDOC_MODE: skip
install:
- git clone https://github.com/etsy/statsd.git ..\statsd
- ps: Start-Process "node" -ArgumentList "..\statsd\stats.js .\src\JustEat.StatsD.Tests\statsdconfig.js" -WindowStyle Hidden
- ps: Start-Process "node" -ArgumentList "..\statsd\stats.js .\tests\JustEat.StatsD.Tests\statsdconfig.js" -WindowStyle Hidden
- ps: .\SetAppVeyorBuildVersion.ps1
build_script:
- ps: .\Build.ps1
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ fi
dotnet build src/JustEat.StatsD/JustEat.StatsD.csproj --output $artifacts --configuration $configuration --framework "netstandard2.0" || exit 1

if [ $skipTests == 0 ]; then
dotnet test src/JustEat.StatsD.Tests/JustEat.StatsD.Tests.csproj --output $artifacts --configuration $configuration --framework "netcoreapp2.1" || exit 1
dotnet test tests/JustEat.StatsD.Tests/JustEat.StatsD.Tests.csproj --output $artifacts --configuration $configuration --framework "netcoreapp2.1" || exit 1
fi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn);CA1001;CA1822</NoWarn>
<OutputType>Exe</OutputType>
Expand All @@ -9,6 +9,6 @@
<PackageReference Include="BenchmarkDotNet" Version="0.11.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\JustEat.StatsD\JustEat.StatsD.csproj" />
<ProjectReference Include="..\..\src\JustEat.StatsD\JustEat.StatsD.csproj" />
</ItemGroup>
</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn);CA1707;CA2007</NoWarn>
<RootNamespace>JustEat.StatsD</RootNamespace>
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\JustEat.StatsD\JustEat.StatsD.csproj" />
<ProjectReference Include="..\..\src\JustEat.StatsD\JustEat.StatsD.csproj" />
</ItemGroup>
<ItemGroup>
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ad8b408

Please sign in to comment.