Skip to content

Commit

Permalink
revert to previous behavior where Uri.IsAbsolute only checked when no…
Browse files Browse the repository at this point in the history
…t null.

Updated runTests.ps1 to be the same as build.ps1
Updated strongNameBypass to include Tests (WsFederation, Saml, OIDC, CrossVersionTokenValidation)
  • Loading branch information
brentschmaltz committed Jun 29, 2020
1 parent fa783a7 commit a22c4f4
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
Binary file modified build/strongNameBypass.reg
Binary file not shown.
Binary file modified build/strongNameBypass2.reg
Binary file not shown.
4 changes: 2 additions & 2 deletions runTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ foreach ($testProject in $testProjects)
Write-Host ">>> Set-Location $root\test\$name"
pushd
Set-Location $root\test\$name
Write-Host ">>> Start-Process -wait -passthru -NoNewWindow $dotnetexe 'test $name.csproj'--no-build --no-restore -nodereuse:false -v d -c $buildType"
$p = Start-Process -wait -passthru -NoNewWindow $dotnetexe "test $name.csproj --no-build --no-restore -nodereuse:false -v d -c $buildType"
Write-Host ">>> Start-Process -Wait -PassThru -NoNewWindow $dotnetexe 'test $name.csproj' --filter category!=nonwindowstests --no-build --no-restore -nodereuse:false -v n -c $buildType"
$p = Start-Process -Wait -PassThru -NoNewWindow $dotnetexe "test $name.csproj --filter category!=nonwindowstests --no-build --no-restore -nodereuse:false -v n -c $buildType"

if($p.ExitCode -ne 0)
{
Expand Down
2 changes: 2 additions & 0 deletions runtests.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@ECHO OFF
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0runtests.ps1' %*; exit $LASTEXITCODE"
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,7 @@ public Uri DeclarationReference
get { return _declarationReference; }
set
{
if (value == null)
throw LogArgumentNullException(nameof(value));

if (!value.IsAbsoluteUri)
if (value != null && !value.IsAbsoluteUri)
throw LogExceptionMessage(new ArgumentException(FormatInvariant(LogMessages.IDX13300, nameof(DeclarationReference), value)));

_declarationReference = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ public void Saml2AuthenticationContext_CtorNullClassAndDeclaration_ArgumentNullE
[Fact]
public void Saml2AuthenticationContext_CtorNullDeclaration_ArgumentNullException()
{
var classRef = new Uri("http://resource", UriKind.Absolute);
Assert.Throws<ArgumentNullException>(() => new Saml2AuthenticationContext(classRef, null));
new Saml2AuthenticationContext(new Uri("http://resource", UriKind.Absolute), null);
}

[Fact]
Expand Down Expand Up @@ -117,10 +116,12 @@ public void Saml2AuthenticationContext_AbsoluteDeclarationReference_NoException(
}

[Fact]
public void Saml2AuthenticationContext_NullDeclarationReference_ArgumentNullException()
public void Saml2AuthenticationContext_NullDeclarationReference()
{
var authContext = new Saml2AuthenticationContext();
Assert.Throws<ArgumentNullException>(() => authContext.DeclarationReference = null);
new Saml2AuthenticationContext
{
DeclarationReference = null
};
}
}
}

0 comments on commit a22c4f4

Please sign in to comment.