This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
builder.RegisterType<DenyAnonymousAccessPolicyViolationHandler>().As<IPolicyViolationHandler>(); | |
Container = builder.Build(); | |
var denyAnonymousAccessPolicyViolationHandler = DependencyResolver.Current.GetService<DenyAnonymousAccessPolicyViolationHandler>(); | |
var denyAnonymousAccessPolicyViolationHandleri = DependencyResolver.Current.GetService<IPolicyViolationHandler>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Web.Mvc; | |
using Hoya.Administration.Web.UI.Controllers; | |
using Machine.Specifications; | |
namespace Hoya.Administration.Web.UI.Specs.SessionControllerSpecs | |
{ | |
[Subject(typeof(SessionController))] | |
public class SessionControllerSpec : BaseSpec | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class base_spec | |
{ | |
protected static AutoMoqer mocker; | |
protected static Mock<IDependencyResolver> resolver; | |
private Establish context = () => | |
{ | |
mocker = new AutoMoqer(); | |
resolver = new Mock<IDependecyResolver> | |
DependencyResolver.SetResolver(resolver.Object); |