-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add netcoreapp1.0 test target to Nancy.Tests #2634
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
namespace Nancy.Tests.Helpers | ||
{ | ||
using System.IO; | ||
using System.Reflection; | ||
|
||
#if CORE | ||
using System.Runtime.Loader; | ||
#endif | ||
|
||
/// <summary> | ||
/// Convenience class with helper methods for <see cref="Assembly"/>. | ||
/// </summary> | ||
public static class AssemblyHelpers | ||
{ | ||
/// <summary> | ||
/// Loads an assembly from the emitted image contained in <paramref name="stream"/>. | ||
/// </summary> | ||
/// <param name="stream">The steam that contains the emitted assembly.</param> | ||
/// <returns>The loaded assembly.</returns> | ||
public static Assembly Load(MemoryStream stream) | ||
{ | ||
#if CORE | ||
stream.Position = 0; | ||
return AssemblyLoadContext.Default.LoadFromStream(stream); | ||
#else | ||
return Assembly.Load(stream.ToArray()); | ||
#endif | ||
|
||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -327,7 +327,7 @@ protected override INancyEngine GetEngineInternal() | |
{ | ||
if (this.ShouldThrowWhenGettingEngine) | ||
{ | ||
throw new ApplicationException("Something when wrong when trying to compose the engine."); | ||
throw new Exception("Something when wrong when trying to compose the engine."); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why change this exception type? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No ApplicationException in .NET Core. I'm happy to use another type, if you like. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Na, fair enough. Let's use |
||
} | ||
|
||
return this.FakeNancyEngine; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -245,7 +245,7 @@ protected override INancyEngine GetEngineInternal() | |
{ | ||
if (this.ShouldThrowWhenGettingEngine) | ||
{ | ||
throw new ApplicationException("Something when wrong when trying to compose the engine."); | ||
throw new Exception("Something when wrong when trying to compose the engine."); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why change this exception type? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No ApplicationException in .NET Core. I'm happy to use another type, if you like. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above |
||
} | ||
|
||
return this.FakeNancyEngine; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
using Nancy.Diagnostics; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Reflection; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is likely not required There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why isn't that change shows in this change set? =) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm sorry, I don't understand. What change? Do you mean "a change involving There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @thecodejunkie, you asked for me to point out any unresponded-to comments. I'm afraid you didn't see this one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, that's fine 👍 |
||
using Xunit; | ||
|
||
public class InteractiveDiagnosticsFixture | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean on unix
dotnet test
is called and then mono is called as well?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I figured that would be desirable. Can be changed.