diff options
author | lcalabrese <lee.calabrese@gmail.com> | 2015-08-07 14:03:07 +0900 |
---|---|---|
committer | lcalabrese <lee.calabrese@gmail.com> | 2015-08-07 14:03:07 +0900 |
commit | c36d5ff1305e2585dd4b063a699ca5a9e3a99dfe (patch) | |
tree | 371a3bac6930d2882f95147ce34d5bb3baf41786 /src/DotNetOpenAuth.Test | |
parent | 369182b4eeb189cd38b87b1f31bd624f55ce96e0 (diff) | |
download | DotNetOpenAuth-c36d5ff1305e2585dd4b063a699ca5a9e3a99dfe.zip DotNetOpenAuth-c36d5ff1305e2585dd4b063a699ca5a9e3a99dfe.tar.gz DotNetOpenAuth-c36d5ff1305e2585dd4b063a699ca5a9e3a99dfe.tar.bz2 |
Fix changes made in previous commits to actually adhere to StyleCop rules, so the project even builds in Release mode
Diffstat (limited to 'src/DotNetOpenAuth.Test')
-rw-r--r-- | src/DotNetOpenAuth.Test/OpenId/Messages/IndirectSignedResponseTests.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.Test/OpenId/Messages/IndirectSignedResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/Messages/IndirectSignedResponseTests.cs index 23e9864..eb252a5 100644 --- a/src/DotNetOpenAuth.Test/OpenId/Messages/IndirectSignedResponseTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/Messages/IndirectSignedResponseTests.cs @@ -95,7 +95,17 @@ namespace DotNetOpenAuth.Test.OpenId.Messages { responseReplay.UtcCreationDate = local; DateTime utcCreationDate = responseReplay.UtcCreationDate; Assert.AreEqual(DateTimeKind.Utc, utcCreationDate.Kind, "Local time should have been converted to universal time."); - //Assert.AreNotEqual(local.Hour, utcCreationDate.Hour, "The hour was expected to change (unless local time _is_ UTC time for this PC!)"); + + // Check if this PC is not UTC (i.e. the UTC hour and local hour are different), if so we can perform this test + DateTime currentUtc = DateTime.UtcNow; + DateTime currentLocal = DateTime.Now; + + if (currentUtc.Hour != currentLocal.Hour) { + Assert.AreNotEqual( + local.Hour, + utcCreationDate.Hour, + "The hour was expected to change (unless local time _is_ UTC time for this PC!)"); + } // Now try setting UTC time just to make sure it DOESN'T mangle the hour if (this.creationDate.Kind != DateTimeKind.Utc) { |