Skip to content

Commit

Permalink
Added static constructor in From.cs in order to initialize services i…
Browse files Browse the repository at this point in the history
…f used outside of the normal test flow (closes #267)
  • Loading branch information
ivaylokenov committed Feb 25, 2017
1 parent 4578bfb commit b6aa9ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/MyTested.AspNetCore.Mvc.Abstractions/From.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
namespace MyTested.AspNetCore.Mvc
{
using Internal.Application;
using Internal.Services;

/// <summary>
/// Provides easy resolving of expression method argument values from the application <see cref="System.IServiceProvider"/>.
/// </summary>
public static class From
{
static From()
{
TestApplication.TryInitialize();
}

/// <summary>
/// Indicates that a argument should be resolved from the application <see cref="System.IServiceProvider"/> in a method call lambda expression.
/// </summary>
Expand Down

0 comments on commit b6aa9ef

Please sign in to comment.