Updated all repo's to have their correct ctor's with their correct dependencies. Updated them all to accept ILogger updated all other dependencies with the same without breaking anything since all is internal, or obsoleted other public methods. Updates lots of the tests with mock instances instead, now more tests have less singleton dependencies, easier to test, much clearer and more IoC driven. Updated unit tests to supply the ILogger for required objects, tests should run faster now since most things are just mocked.
This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Web.Security;
|
||||
@@ -16,6 +17,16 @@ namespace Umbraco.Web.Mvc
|
||||
[MergeParentContextViewData]
|
||||
public abstract class SurfaceController : PluginController
|
||||
{
|
||||
/// <summary>
|
||||
/// Default constructor
|
||||
/// </summary>
|
||||
/// <param name="umbracoContext"></param>
|
||||
/// <param name="logger"></param>
|
||||
protected SurfaceController(ILogger logger, UmbracoContext umbracoContext)
|
||||
: base(logger, umbracoContext)
|
||||
{
|
||||
_membershipHelper = new MembershipHelper(umbracoContext);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor
|
||||
|
||||
Reference in New Issue
Block a user