Skip to content

Commit

Permalink
Migrated unit and integration tests to project.json
Browse files Browse the repository at this point in the history
  • Loading branch information
jerriep committed Nov 24, 2016
1 parent d6bf4c2 commit b2ebccc
Show file tree
Hide file tree
Showing 27 changed files with 12,584 additions and 524 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Auth0.Net-tests/App.config
*.user
*.nupkg
secrets.config
client-secrets.json

# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
[Bb]in/
Expand Down
10 changes: 5 additions & 5 deletions .vs/restore.dg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#:C:\Development\auth0\auth0.net\tests\ConsoleWorkbench\ConsoleWorkbench.xproj
C:\Development\auth0\auth0.net\tests\ConsoleWorkbench\ConsoleWorkbench.xproj|C:\Development\auth0\auth0.net\src\Auth0.Core\Auth0.Core.xproj
C:\Development\auth0\auth0.net\tests\ConsoleWorkbench\ConsoleWorkbench.xproj|C:\Development\auth0\auth0.net\src\Auth0.ManagementApi\Auth0.ManagementApi.xproj
C:\Development\auth0\auth0.net\tests\ConsoleWorkbench\ConsoleWorkbench.xproj|C:\Development\auth0\auth0.net\src\Auth0.AuthenticationApi\Auth0.AuthenticationApi.xproj
C:\Development\auth0\auth0.net\src\Auth0.ManagementApi\Auth0.ManagementApi.xproj|C:\Development\auth0\auth0.net\src\Auth0.Core\Auth0.Core.xproj
#:C:\Development\auth0\auth0.net\tests\Auth0.AuthenticationApi.IntegrationTests\Auth0.AuthenticationApi.IntegrationTests.xproj
C:\Development\auth0\auth0.net\tests\Auth0.AuthenticationApi.IntegrationTests\Auth0.AuthenticationApi.IntegrationTests.xproj|C:\Development\auth0\auth0.net\src\Auth0.Core\Auth0.Core.xproj
C:\Development\auth0\auth0.net\tests\Auth0.AuthenticationApi.IntegrationTests\Auth0.AuthenticationApi.IntegrationTests.xproj|C:\Development\auth0\auth0.net\src\Auth0.AuthenticationApi\Auth0.AuthenticationApi.xproj
C:\Development\auth0\auth0.net\tests\Auth0.AuthenticationApi.IntegrationTests\Auth0.AuthenticationApi.IntegrationTests.xproj|C:\Development\auth0\auth0.net\src\Auth0.ManagementApi\Auth0.ManagementApi.xproj
C:\Development\auth0\auth0.net\src\Auth0.AuthenticationApi\Auth0.AuthenticationApi.xproj|C:\Development\auth0\auth0.net\src\Auth0.Core\Auth0.Core.xproj
C:\Development\auth0\auth0.net\src\Auth0.ManagementApi\Auth0.ManagementApi.xproj|C:\Development\auth0\auth0.net\src\Auth0.Core\Auth0.Core.xproj
42 changes: 21 additions & 21 deletions Auth0.Net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0EBAD055
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTestWorkbench", "tests\ConsoleTestWorkbench\ConsoleTestWorkbench.csproj", "{779564FF-1CEE-4C4F-A867-F8A0EA60FC03}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Auth0.ManagementApi.IntegrationTests", "tests\Auth0.ManagementApi.IntegrationTests\Auth0.ManagementApi.IntegrationTests.csproj", "{BFD5E1F6-053E-490E-AE4E-8CF12F74FFE6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Auth0.AuthenticationApi.IntegrationTests", "tests\Auth0.AuthenticationApi.IntegrationTests\Auth0.AuthenticationApi.IntegrationTests.csproj", "{174CFC4B-5544-4151-969B-0B9F16087349}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Auth0.Core.UnitTests", "tests\Auth0.Core.UnitTests\Auth0.Core.UnitTests.csproj", "{BD25EDDC-6D8C-4E63-9CD1-DF5DC0D9E97E}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Auth0.Core", "src\Auth0.Core\Auth0.Core.xproj", "{0F45514D-6CF8-4962-8FED-BE000AE6FD09}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Auth0.ManagementApi", "src\Auth0.ManagementApi\Auth0.ManagementApi.xproj", "{78B2102E-B5F2-4C35-A485-BFAC3576C6DD}"
Expand All @@ -37,6 +31,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
global.json = global.json
EndProjectSection
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Auth0.Core.UnitTests", "tests\Auth0.Core.UnitTests\Auth0.Core.UnitTests.xproj", "{49CFAA66-C4A3-45DA-AD10-DBE9B5B35F2B}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Auth0.AuthenticationApi.IntegrationTests", "tests\Auth0.AuthenticationApi.IntegrationTests\Auth0.AuthenticationApi.IntegrationTests.xproj", "{72307777-1064-4E95-95FC-957FBDF117B2}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Auth0.ManagementApi.IntegrationTests", "tests\Auth0.ManagementApi.IntegrationTests\Auth0.ManagementApi.IntegrationTests.xproj", "{AE75D5CF-1AB0-4630-B53C-EA6C7347A114}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -47,18 +47,6 @@ Global
{779564FF-1CEE-4C4F-A867-F8A0EA60FC03}.Debug|Any CPU.Build.0 = Debug|Any CPU
{779564FF-1CEE-4C4F-A867-F8A0EA60FC03}.Release|Any CPU.ActiveCfg = Release|Any CPU
{779564FF-1CEE-4C4F-A867-F8A0EA60FC03}.Release|Any CPU.Build.0 = Release|Any CPU
{BFD5E1F6-053E-490E-AE4E-8CF12F74FFE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BFD5E1F6-053E-490E-AE4E-8CF12F74FFE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BFD5E1F6-053E-490E-AE4E-8CF12F74FFE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BFD5E1F6-053E-490E-AE4E-8CF12F74FFE6}.Release|Any CPU.Build.0 = Release|Any CPU
{174CFC4B-5544-4151-969B-0B9F16087349}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{174CFC4B-5544-4151-969B-0B9F16087349}.Debug|Any CPU.Build.0 = Debug|Any CPU
{174CFC4B-5544-4151-969B-0B9F16087349}.Release|Any CPU.ActiveCfg = Release|Any CPU
{174CFC4B-5544-4151-969B-0B9F16087349}.Release|Any CPU.Build.0 = Release|Any CPU
{BD25EDDC-6D8C-4E63-9CD1-DF5DC0D9E97E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BD25EDDC-6D8C-4E63-9CD1-DF5DC0D9E97E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD25EDDC-6D8C-4E63-9CD1-DF5DC0D9E97E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD25EDDC-6D8C-4E63-9CD1-DF5DC0D9E97E}.Release|Any CPU.Build.0 = Release|Any CPU
{0F45514D-6CF8-4962-8FED-BE000AE6FD09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F45514D-6CF8-4962-8FED-BE000AE6FD09}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F45514D-6CF8-4962-8FED-BE000AE6FD09}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -75,18 +63,30 @@ Global
{069CF38F-891B-4106-88B8-DE76D740EAC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{069CF38F-891B-4106-88B8-DE76D740EAC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{069CF38F-891B-4106-88B8-DE76D740EAC3}.Release|Any CPU.Build.0 = Release|Any CPU
{49CFAA66-C4A3-45DA-AD10-DBE9B5B35F2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{49CFAA66-C4A3-45DA-AD10-DBE9B5B35F2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49CFAA66-C4A3-45DA-AD10-DBE9B5B35F2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49CFAA66-C4A3-45DA-AD10-DBE9B5B35F2B}.Release|Any CPU.Build.0 = Release|Any CPU
{72307777-1064-4E95-95FC-957FBDF117B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{72307777-1064-4E95-95FC-957FBDF117B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{72307777-1064-4E95-95FC-957FBDF117B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{72307777-1064-4E95-95FC-957FBDF117B2}.Release|Any CPU.Build.0 = Release|Any CPU
{AE75D5CF-1AB0-4630-B53C-EA6C7347A114}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE75D5CF-1AB0-4630-B53C-EA6C7347A114}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE75D5CF-1AB0-4630-B53C-EA6C7347A114}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE75D5CF-1AB0-4630-B53C-EA6C7347A114}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{779564FF-1CEE-4C4F-A867-F8A0EA60FC03} = {0EBAD055-E431-443B-8212-411D1AFE3796}
{BFD5E1F6-053E-490E-AE4E-8CF12F74FFE6} = {0EBAD055-E431-443B-8212-411D1AFE3796}
{174CFC4B-5544-4151-969B-0B9F16087349} = {0EBAD055-E431-443B-8212-411D1AFE3796}
{BD25EDDC-6D8C-4E63-9CD1-DF5DC0D9E97E} = {0EBAD055-E431-443B-8212-411D1AFE3796}
{0F45514D-6CF8-4962-8FED-BE000AE6FD09} = {C9550C3F-90EB-42C0-B530-E728566A13C2}
{78B2102E-B5F2-4C35-A485-BFAC3576C6DD} = {C9550C3F-90EB-42C0-B530-E728566A13C2}
{DB8AFC1D-2A56-4CF4-9F54-7B7511B674ED} = {C9550C3F-90EB-42C0-B530-E728566A13C2}
{069CF38F-891B-4106-88B8-DE76D740EAC3} = {0EBAD055-E431-443B-8212-411D1AFE3796}
{49CFAA66-C4A3-45DA-AD10-DBE9B5B35F2B} = {0EBAD055-E431-443B-8212-411D1AFE3796}
{72307777-1064-4E95-95FC-957FBDF117B2} = {0EBAD055-E431-443B-8212-411D1AFE3796}
{AE75D5CF-1AB0-4630-B53C-EA6C7347A114} = {0EBAD055-E431-443B-8212-411D1AFE3796}
EndGlobalSection
EndGlobal

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>72307777-1064-4e95-95fc-957fbdf117b2</ProjectGuid>
<RootNamespace>Auth0.AuthenticationApi.IntegrationTests</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,14 @@ await context.OpenAsync(request =>
request.Content(authenticationResponse.HtmlForm);
});

await context.Active.QuerySelector<IHtmlFormElement>("form").Submit();
await context.Active.QuerySelector<IHtmlFormElement>("form").SubmitAsync();

// Extract the URL and query from the postback
var uri = new Uri(context.Active.Url);
var code = HttpUtility.ParseQueryString(uri.Query)["code"];
//var code = HttpUtility.ParseQueryString(uri.Query)["code"];

// Assert that callback is made and code is passed back
code.Should().NotBeNull();
//code.Should().NotBeNull();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,18 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Auth0.AuthenticationApi.IntegrationTests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Auth0.AuthenticationApi.IntegrationTests")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("174cfc4b-5544-4151-969b-0b9f16087349")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: Guid("72307777-1064-4e95-95fc-957fbdf117b2")]
13 changes: 0 additions & 13 deletions tests/Auth0.AuthenticationApi.IntegrationTests/app.config

This file was deleted.

13 changes: 0 additions & 13 deletions tests/Auth0.AuthenticationApi.IntegrationTests/packages.config

This file was deleted.

Loading

0 comments on commit b2ebccc

Please sign in to comment.