Exemplo n.º 1
0
        public override void SetUp()
        {
            base.SetUp();

            parser = mocks.StrictMock <IUrlParser>();
            mocks.ReplayAll();

            IntegrityManager  integrity = new IntegrityManager(definitions, persister.Repository, parser);
            IntegrityEnforcer enforcer  = new IntegrityEnforcer(persister, integrity, activator);

            enforcer.Start();

            new BehaviorInvoker(persister, new N2.Definitions.Static.DefinitionMap()).Start();
        }
Exemplo n.º 2
0
        public override void SetUp()
        {
            base.SetUp();

            parser = mocks.StrictMock <IUrlParser>();
            mocks.ReplayAll();

            finder = new FakeItemFinder(() => Enumerable.Empty <ContentItem>());

            IntegrityManager  integrity = new IntegrityManager(definitions, finder, parser);
            IntegrityEnforcer enforcer  = new IntegrityEnforcer(persister, integrity, activator);

            enforcer.Start();
        }
Exemplo n.º 3
0
        public override void SetUp()
        {
            base.SetUp();

            CreatePersister();

            parser = mocks.StrictMock <IUrlParser>();

            ITypeFinder       typeFinder = CreateTypeFinder();
            DefinitionBuilder builder    = new DefinitionBuilder(typeFinder, new EngineSection());
            IItemNotifier     notifier   = mocks.DynamicMock <IItemNotifier>();

            mocks.Replay(notifier);
            activator       = new ContentActivator(new N2.Edit.Workflow.StateChanger(), notifier, new EmptyProxyFactory());
            definitions     = new DefinitionManager(new [] { new DefinitionProvider(builder) }, activator);
            finder          = new FakeItemFinder(definitions, () => Enumerable.Empty <ContentItem>());
            integrityManger = new IntegrityManager(definitions, finder, parser);
            IntegrityEnforcer enforcer = new IntegrityEnforcer(persister, integrityManger, activator);

            enforcer.Start();
        }
Exemplo n.º 4
0
        public override void SetUp()
        {
            base.SetUp();

            CreatePersister();

            parser = mocks.StrictMock <IUrlParser>();

            ITypeFinder       typeFinder = CreateTypeFinder();
            DefinitionBuilder builder    = new DefinitionBuilder(new DefinitionMap(), typeFinder, new TransformerBase <IUniquelyNamed> [0], TestSupport.SetupEngineSection());
            IItemNotifier     notifier   = mocks.DynamicMock <IItemNotifier>();

            mocks.Replay(notifier);
            var changer = new N2.Edit.Workflow.StateChanger();

            activator       = new ContentActivator(changer, notifier, new EmptyProxyFactory());
            definitions     = new DefinitionManager(new[] { new DefinitionProvider(builder) }, activator, changer, new DefinitionMap());
            integrityManger = new IntegrityManager(definitions, persister.Repository, parser);
            IntegrityEnforcer enforcer = new IntegrityEnforcer(persister, integrityManger, activator);

            enforcer.Start();
        }