Permalink
Browse files

#68 Updated tests to assert correctly on Mono.

  • Loading branch information...
1 parent b10c3e4 commit 38031098396eb9c99692ad70a0ccd2b58ddf5889 Oliver, Jonathan committed Jul 19, 2012
View
5 src/tests/NanoMessageBus.UnitTests/Channels/HttpRequestAuditorExtensionsTests.cs
@@ -95,7 +95,7 @@ public class when_cloning_an_http_context : using_an_http_context
It should_return_the_same_app_relative_path = () =>
clone.Request.AppRelativeCurrentExecutionFilePath.ShouldEqual(
- original.Request.AppRelativeCurrentExecutionFilePath);
+ original.Request.AppRelativeCurrentExecutionFilePath);
It should_return_the_same_content_encoding = () =>
clone.Request.ContentEncoding.ShouldEqual(original.Request.ContentEncoding);
@@ -244,7 +244,7 @@ public abstract class using_an_http_context
mockContext.Setup(x => x.AllErrors).Returns(new[] { error });
mockContext.Setup(x => x.IsDebuggingEnabled).Returns(true);
mockContext.Setup(x => x.IsCustomErrorEnabled).Returns(true);
- mockContext.Setup(x => x.IsPostNotification).Returns(true);
+ mockContext.Setup(x => x.IsPostNotification).Returns(MicrosoftRuntime); // not supported on Mono
mockContext.Setup(x => x.SkipAuthorization).Returns(true);
mockContext.Setup(x => x.Timestamp).Returns(SystemTime.UtcNow);
@@ -296,6 +296,7 @@ private static NameValueCollection Generate(int items)
return collection;
}
+ private static readonly bool MicrosoftRuntime = Type.GetType("Mono.Runtime") == null;
protected static HttpContextBase original;
static readonly Exception error = new Exception();
}

0 comments on commit 3803109

Please sign in to comment.