Example #1
0
        public override void SetUp()
        {
            base.SetUp();

            IPersister persister = mocks.Stub <IPersister>();

            Expect.Call(delegate { persister.Save(null); })
            .IgnoreArguments()
            .Do(new Action <ContentItem>(savedItems.Add))
            .Repeat.Any();

            IEditManager editManager = mocks.Stub <IEditManager>();

            Expect.Call(editManager.GetEditorFilter(null))
            .IgnoreArguments()
            .Return(new PageFilter());

            IWebContext webContext = mocks.Stub <IWebContext>();

            mocks.ReplayAll();

            root            = CreateOneItem <NormalPage>(1, "root", null);
            page1           = CreateOneItem <NormalPage>(2, "page1", root);
            page2           = CreateOneItem <NormalPage>(3, "page2", root);
            page2.SortOrder = 1;
            page3           = CreateOneItem <NormalPage>(4, "page3", root);
            page3.SortOrder = 2;

            sorter = new TreeSorter(persister, editManager, webContext);
        }
Example #2
0
        public TreeSorter(IPersister persister, IEditManager editManager, IWebContext webContext, IVersionManager versionMaker)
		{
			this.persister = persister;
			this.editManager = editManager;
			this.webContext = webContext;
            this.versionMaker = versionMaker;
		}
Example #3
0
        public EditorView()
        {
            InitializeComponent();

            editManager = BundleRuntime.Instance.GetFirstOrDefaultService <IEditManager>();
            richTextBox.ModifiedChanged += delegate { OnModifiedChanged(); };
        }
 public TreeSorter(IPersister persister, IEditManager editManager, IWebContext webContext, IVersionManager versionMaker)
 {
     this.persister    = persister;
     this.editManager  = editManager;
     this.webContext   = webContext;
     this.versionMaker = versionMaker;
 }
 public FileSystemHandlerFactory(IFileSystem fs, IEditManager editManager, IWebContext requestContext, EventBroker broker)
 {
     this.fs = fs;
     this.editManager = editManager;
     this.requestContext = requestContext;
     this.broker = broker;
 }
Example #6
0
        public override void SetUp()
        {
            base.SetUp();

            FakeRepository <ContentDetail> linkRepository;

            persister = TestSupport.SetupFakePersister(out repository, out linkRepository);
            var webContext = new ThreadContext();

            IEditManager editManager = mocks.Stub <IEditManager>();

            Expect.Call(editManager.GetEditorFilter(null))
            .IgnoreArguments()
            .Return(new PageFilter());
            mocks.ReplayAll();

            root            = CreateOneItem <NormalPage>(1, "root", null);
            page1           = CreateOneItem <NormalPage>(2, "page1", root);
            page2           = CreateOneItem <NormalPage>(3, "page2", root);
            page2.SortOrder = 1;
            page3           = CreateOneItem <NormalPage>(4, "page3", root);
            page3.SortOrder = 2;

            sorter = new TreeSorter(persister, editManager, webContext);
        }
Example #7
0
        protected override void OnPreInit(EventArgs e)
        {
            base.OnPreInit(e);

            Definitions = Engine.Definitions;
            Edits = Engine.EditManager;
            Wizard = Engine.Resolve<LocationWizard>();
            Templates = Engine.Resolve<IContentTemplateRepository>();
        }
Example #8
0
 protected override void OnPreInit(EventArgs e)
 {
     base.OnPreInit(e);
     Security        = Engine.SecurityManager;
     Definitions     = Engine.Definitions;
     Versions        = Engine.Resolve <IVersionManager>();
     Commands        = Engine.Resolve <CommandDispatcher>();
     EditManager     = Engine.EditManager;
     ManagementPaths = Engine.ManagementPaths;
 }
Example #9
0
		protected override void OnPreInit(EventArgs e)
		{
			base.OnPreInit(e);
			Security = Engine.SecurityManager;
			Definitions = Engine.Definitions;
			Versions = Engine.Resolve<IVersionManager>();
			Commands = Engine.Resolve<CommandDispatcher>();
			EditManager = Engine.EditManager;
			ManagementPaths = Engine.ManagementPaths;
		}
        public override void SetUp()
        {
            CreateDatabaseSchema();
            base.SetUp();

            persister = engine.Resolve<IPersister>();
			activator = engine.Resolve<ContentActivator>();
            editManager = engine.Resolve<IEditManager>();
            versionManager = engine.Resolve<IVersionManager>();

            editors = new Dictionary<string, Control>();
            editors["Title"] = new TextBox { Text = "New title" };
        }
Example #11
0
        public override void SetUp()
        {
            CreateDatabaseSchema();
            base.SetUp();

            persister      = engine.Resolve <IPersister>();
            activator      = engine.Resolve <ContentActivator>();
            editManager    = engine.Resolve <IEditManager>();
            versionManager = engine.Resolve <IVersionManager>();

            editors          = new Dictionary <string, Control>();
            editors["Title"] = new TextBox {
                Text = "New title"
            };
        }
        public override void SetUp()
        {
            base.SetUp();

            persister = TestSupport.SetupFakePersister();
            var webContext = new ThreadContext();

            IEditManager editManager = mocks.Stub <IEditManager>();

            Expect.Call(editManager.GetEditorFilter(null))
            .IgnoreArguments()
            .Return(new PageFilter());
            mocks.ReplayAll();

            root  = CreateOneItem <NormalPage>(1, "root", null);
            page1 = CreateOneItem <NormalPage>(2, "page1", root);
            item2 = CreateOneItem <NormalItem>(3, "item2", root);
            page3 = CreateOneItem <NormalPage>(4, "page3", root);
            item4 = CreateOneItem <NormalItem>(5, "item4", root);
            page5 = CreateOneItem <NormalPage>(6, "page5", root);
            N2.Utility.UpdateSortOrder(root.Children);

            sorter = new TreeSorter(persister, editManager, webContext);
        }
Example #13
0
 public TreeSorter(IPersister persister, IEditManager editManager, IWebContext webContext)
 {
     this.persister   = persister;
     this.editManager = editManager;
     this.webContext  = webContext;
 }
Example #14
0
		public TreeSorter(IPersister persister, IEditManager editManager, IWebContext webContext)
		{
			this.persister = persister;
			this.editManager = editManager;
			this.webContext = webContext;
		}
Example #15
0
 protected override void OnPreInit(EventArgs e)
 {
     base.OnPreInit(e);
     Security = Engine.SecurityManager;
     Definitions = Engine.Definitions;
     Templates = Engine.Resolve<IContentTemplateRepository>();
     Versions = Engine.Resolve<IVersionManager>();
     Commands = Engine.Resolve<CommandDispatcher>();
     Edits = Engine.EditManager;
 }