Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #445 from larsw/testcategory-on-integration-tests
Browse files Browse the repository at this point in the history
Decorated all test methods in integration test fixtures with [TestCategory("Integration")] for better filtering
  • Loading branch information
leastprivilege committed Oct 18, 2013
2 parents eef7c4a + 89fbccf commit 50cf135
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Tests/Integration Tests/OAuth2Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class OAuth2Tests
string scopeAsymmetric = Constants.Realms.TestRPAsymmetric;

[TestMethod]
[TestCategory("Integration")]
public void ValidUserNameCredentialValidClientCredentialSymmetric()
{
var client = new OAuth2Client(
Expand All @@ -46,6 +47,7 @@ public void ValidUserNameCredentialValidClientCredentialSymmetric()
}

[TestMethod]
[TestCategory("Integration")]
public void ValidUserNameCredentialValidClientCredentialAsymmetric()
{
var client = new OAuth2Client(
Expand All @@ -67,6 +69,7 @@ public void ValidUserNameCredentialValidClientCredentialAsymmetric()
}

[TestMethod]
[TestCategory("Integration")]
public void ValidUserNameCredentialValidClientCredentialUseRefreshToken()
{
var client = new OAuth2Client(
Expand Down Expand Up @@ -101,6 +104,7 @@ public void ValidUserNameCredentialValidClientCredentialUseRefreshToken()
}

[TestMethod]
[TestCategory("Integration")]
[ExpectedException(typeof(HttpRequestException))]
public void ValidUserNameCredentialMissingClientCredential()
{
Expand All @@ -113,6 +117,7 @@ public void ValidUserNameCredentialMissingClientCredential()
}

[TestMethod]
[TestCategory("Integration")]
[ExpectedException(typeof(HttpRequestException))]
public void ValidUserNameCredentialInvalidClientCredential()
{
Expand Down Expand Up @@ -172,6 +177,7 @@ public void ValidUserNameCredentialInvalidClientCredential()
//}

[TestMethod]
[TestCategory("Integration")]
public void InvalidUserNameCredential()
{
var form = new FormUrlEncodedContent(new Dictionary<string, string>
Expand All @@ -191,6 +197,7 @@ public void InvalidUserNameCredential()
}

[TestMethod]
[TestCategory("Integration")]
public void UnauthorizedUser()
{
var form = new FormUrlEncodedContent(new Dictionary<string, string>
Expand All @@ -209,6 +216,7 @@ public void UnauthorizedUser()
}

[TestMethod]
[TestCategory("Integration")]
public void NoRealm()
{
var form = new FormUrlEncodedContent(new Dictionary<string, string>
Expand All @@ -226,6 +234,7 @@ public void NoRealm()
}

[TestMethod]
[TestCategory("Integration")]
public void MalformedRealm()
{
var form = new FormUrlEncodedContent(new Dictionary<string, string>
Expand All @@ -244,6 +253,7 @@ public void MalformedRealm()
}

[TestMethod]
[TestCategory("Integration")]
public void InvalidGrantType()
{
var form = new FormUrlEncodedContent(new Dictionary<string, string>
Expand All @@ -262,6 +272,7 @@ public void InvalidGrantType()
}

[TestMethod]
[TestCategory("Integration")]
public void NoUserCredentials()
{
var form = new FormUrlEncodedContent(new Dictionary<string, string>
Expand Down
9 changes: 9 additions & 0 deletions src/Tests/Integration Tests/SimpleHttpTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class SimpleHttp
string rp = Constants.Realms.TestRPSymmetric;

[TestMethod]
[TestCategory("Integration")]
public void NoRealm()
{
var client = new HttpClient();
Expand All @@ -33,6 +34,7 @@ public void NoRealm()
}

[TestMethod]
[TestCategory("Integration")]
public void MalformedRealm()
{
var values = new Dictionary<string, string>
Expand All @@ -48,6 +50,7 @@ public void MalformedRealm()
}

[TestMethod]
[TestCategory("Integration")]
public void NoCredentials()
{
var values = new Dictionary<string, string>
Expand All @@ -62,6 +65,7 @@ public void NoCredentials()
}

[TestMethod]
[TestCategory("Integration")]
public void ValidUserNameCredential()
{
var values = new Dictionary<string, string>
Expand All @@ -79,6 +83,7 @@ public void ValidUserNameCredential()
}

[TestMethod]
[TestCategory("Integration")]
public void UnAuthorizedUser()
{
var values = new Dictionary<string, string>
Expand All @@ -94,6 +99,7 @@ public void UnAuthorizedUser()
}

[TestMethod]
[TestCategory("Integration")]
public void ValidUserNameCredentialSaml11()
{
var values = new Dictionary<string, string>
Expand All @@ -114,6 +120,7 @@ public void ValidUserNameCredentialSaml11()
}

[TestMethod]
[TestCategory("Integration")]
public void ValidUserNameCredentialSaml2()
{
var values = new Dictionary<string, string>
Expand All @@ -135,6 +142,7 @@ public void ValidUserNameCredentialSaml2()


[TestMethod]
[TestCategory("Integration")]
public void ValidUserNameCredentialJwt()
{
var values = new Dictionary<string, string>
Expand All @@ -155,6 +163,7 @@ public void ValidUserNameCredentialJwt()
}

[TestMethod]
[TestCategory("Integration")]
public void InvalidUserNameCredential()
{
var values = new Dictionary<string, string>
Expand Down
11 changes: 11 additions & 0 deletions src/Tests/Integration Tests/WSTrustTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public void Setup()
}

[TestMethod]
[TestCategory("Integration")]
public void ValidUserNameCredentialSymmetric()
{
RequestSecurityTokenResponse rstr;
Expand All @@ -58,6 +59,7 @@ public void ValidUserNameCredentialSymmetric()
}

[TestMethod]
[TestCategory("Integration")]
public void ValidClientCertificateCredentialSymmetric()
{
RequestSecurityTokenResponse rstr;
Expand All @@ -67,6 +69,7 @@ public void ValidClientCertificateCredentialSymmetric()
}

[TestMethod]
[TestCategory("Integration")]
public void ValidUserNameCredentialSaml11Symmetric()
{
var rst = new RequestSecurityToken
Expand All @@ -87,6 +90,7 @@ public void ValidUserNameCredentialSaml11Symmetric()
}

[TestMethod]
[TestCategory("Integration")]
public void ValidUserNameCredentialSaml11Bearer()
{
var rst = new RequestSecurityToken
Expand All @@ -107,6 +111,7 @@ public void ValidUserNameCredentialSaml11Bearer()
}

[TestMethod]
[TestCategory("Integration")]
public void ValidUserNameCredentialSaml2Bearer()
{
var rst = new RequestSecurityToken
Expand All @@ -127,6 +132,7 @@ public void ValidUserNameCredentialSaml2Bearer()
}

[TestMethod]
[TestCategory("Integration")]
public void ValidUserNameCredentialSaml2Symmetric()
{
var rst = new RequestSecurityToken
Expand All @@ -147,6 +153,7 @@ public void ValidUserNameCredentialSaml2Symmetric()
}

[TestMethod]
[TestCategory("Integration")]
public void ValidUserNameCredentialJwtSymmetric()
{
var rst = new RequestSecurityToken
Expand All @@ -167,6 +174,7 @@ public void ValidUserNameCredentialJwtSymmetric()
}

[TestMethod]
[TestCategory("Integration")]
public void ValidUserNameCredentialJwtBearer()
{
var rst = new RequestSecurityToken
Expand All @@ -188,6 +196,7 @@ public void ValidUserNameCredentialJwtBearer()


[TestMethod]
[TestCategory("Integration")]
[ExpectedException(typeof(MessageSecurityException))]
public void InvalidUserNameCredentialSymmetric()
{
Expand All @@ -201,6 +210,7 @@ public void InvalidUserNameCredentialSymmetric()
}

[TestMethod]
[TestCategory("Integration")]
[ExpectedException(typeof(FaultException))]
public void UnauthorizedUserSymmetric()
{
Expand All @@ -214,6 +224,7 @@ public void UnauthorizedUserSymmetric()
}

[TestMethod]
[TestCategory("Integration")]
[ExpectedException(typeof(FaultException))]
public void NoRealm()
{
Expand Down

0 comments on commit 50cf135

Please sign in to comment.