-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Netcore tests #774
Netcore tests #774
Changes from 8 commits
46c8a71
0649e80
551828c
6054a9b
62f11c0
25c074e
8735173
9dfceec
337c3e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ Backup* | |
*.user | ||
.vs | ||
project.lock.json | ||
*~ | ||
|
||
msbuild.log | ||
TestResult.xml | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"version": "1.0.0-*", | ||
|
||
"dependencies": { | ||
"Google.Apis.Core": "1.14", | ||
"Google.Apis.Auth": "1.14", | ||
"GoogleApis.Tests_dotnetcore": { | ||
"target": "project" | ||
}, | ||
"Nunit": "3.4.0", | ||
"dotnet-test-nunit": "3.4.0-beta-1" | ||
}, | ||
|
||
"compile": "../GoogleApis.Auth.Tests/**/*.cs", | ||
|
||
"exclude": [ | ||
"../GoogleApis.Auth.Tests/Program.cs", | ||
"../GoogleApis.Auth.Tests/OAuth2/Flows/*.cs" | ||
], | ||
|
||
"testRunner": "nunit", | ||
|
||
"frameworks": { | ||
"netcoreapp1.0": { | ||
"imports": [ | ||
"netcoreapp1.0", | ||
"portable-net45+win8" | ||
], | ||
"dependencies": { | ||
"Microsoft.NETCore.App": { | ||
"version": "1.0.0-*", | ||
"type": "platform" | ||
} | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"version": "1.0.0-*", | ||
|
||
"dependencies": { | ||
"Google.Apis.Core": "1.14", | ||
"Nunit": "3.4.0", | ||
"dotnet-test-nunit": "3.4.0-beta-1" | ||
}, | ||
|
||
"compile": "../GoogleApis.Tests/**/*.cs", | ||
|
||
"exclude": [ | ||
"../GoogleApis.Tests/Program.cs", | ||
"../GoogleApis.Tests/Apis/*/*.cs", | ||
"../GoogleApis.Tests/[Mock]/CountableMessageHandler.cs", | ||
"../GoogleApis.Tests/[Mock]/MockBackOffHandler.cs", | ||
"../GoogleApis.Tests/[Mock]/MockClientService.cs", | ||
"../GoogleApis.Tests/[Mock]/MockHttpClientFactory.cs", | ||
"../GoogleApis.Tests/[Mock]/MockMessageHandler.cs" | ||
], | ||
|
||
"testRunner": "nunit", | ||
|
||
"frameworks": { | ||
"netcoreapp1.0": { | ||
"imports": [ | ||
"netcoreapp1.0", | ||
"portable-net45+win8" | ||
], | ||
"dependencies": { | ||
"Microsoft.NETCore.App": { | ||
"version": "1.0.0-*", | ||
"type": "platform" | ||
} | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"projects": [ "Support" ], | ||
"sdk": { | ||
"version": "1.0.0-preview2-003121" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@echo off | ||
rem Runs the tests locally. | ||
|
||
setlocal | ||
|
||
set runner_root=%USERPROFILE%\testrunner | ||
set nunit="%runner_root%\NUnit.ConsoleRunner.3.2.1\tools\nunit3-console.exe" | ||
|
||
if not exist %nunit% ( | ||
rem Grabs the nunit test runner. | ||
echo Installing nunit runner. | ||
nuget install NUnit.ConsoleRunner -Version 3.2.1 -OutputDirectory "%runner_root%" | ||
) else ( | ||
echo Nunit runner already installed. | ||
) | ||
|
||
rem Build the code with the travis configuration. | ||
pushd Src\Support | ||
msbuild /p:Configuration=ReleaseTravis GoogleApisClient.sln | ||
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong. |
||
|
||
set output=bin\ReleaseSigned | ||
|
||
%nunit% --where "cat != IgnoreOnTravis" ^ | ||
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong. |
||
"GoogleApis.Tests\%output%\Google.Apis.Tests.exe" ^ | ||
"GoogleApis.Auth.Tests\%output%\Google.Apis.Auth.Tests.exe" ^ | ||
"GoogleApis.Auth.DotNet4.Tests\%output%\Google.Apis.Auth.DotNet4.Tests.exe" | ||
|
||
popd | ||
echo Done. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@echo off | ||
rem Runs the .NET Core tests locally. | ||
|
||
setlocal | ||
|
||
REM Build the support libraries. | ||
msbuild SupportLibraries.proj | ||
|
||
REM Clean slate after the build. | ||
set workspace=%~dp0 | ||
set fallback=%workspace%\NuPkgs | ||
set packages=%workspace%\packages | ||
|
||
REM Restore the test projects. | ||
dotnet restore ^ | ||
"Src\Support\GoogleApis.Tests_dotnetcore" ^ | ||
"Src\Support\GoogleApis.Auth.Tests_dotnetcore" ^ | ||
--packages "%packages%" ^ | ||
-f "%fallback%" ^ | ||
--no-cache | ||
|
||
REM Run the tests. | ||
dotnet test "Src\Support\GoogleApis.Tests_dotnetcore" | ||
dotnet test "Src\Support\GoogleApis.Auth.Tests_dotnetcore" | ||
|
||
echo Done. |
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong.