Exemplo n.º 1
0
 public override void SetUp()
 {
     base.SetUp();
     var changer = new StateChanger();
     definitions = TestSupport.SetupDefinitions(typeof(StatefulPage), typeof(StatefulPart));
     versions = new FakeVersionManager(repository, changer, typeof(StatefulPage), typeof(StatefulPart));
     var editManager = new EditUrlManager(null, new EditSection());
     var security = new SecurityManager(new FakeWebContextWrapper(), new EditSection());
     commands = new CommandFactory(persister, security, versions, editManager, null, changer);
     dispatcher = new CommandDispatcher(commands, persister);
     item = CreateOneItem<StatefulPage>(1, "first", null);
     child = CreateOneItem<StatefulPage>(2, "child", item);
 }
Exemplo n.º 2
0
        public override void SetUp()
        {
            base.SetUp();

            CreatePersister();
            parser = mocks.StrictMock<N2.Web.IUrlParser>();
            context = CreateWebContext(false);

            EditSection editSection = new EditSection();
            security = new SecurityManager(context, editSection);
            enforcer = new SecurityEnforcer(persister, security, new ContentActivator(null, null, null), parser, context, new HostSection());
            enforcer.Start();
        }
Exemplo n.º 3
0
        public override void SetUp()
        {
            base.SetUp();

            CreatePersister();
            parser = mocks.StrictMock<N2.Web.IUrlParser>();
            context = CreateWebContext(false);

            EditSection editSection = new EditSection();
            security = new SecurityManager(context, editSection);
            enforcer = new SecurityEnforcer(persister, security, MockRepository.GenerateStub<IDefinitionManager>(), parser, context);
            enforcer.Start();
        }