Example #1
0
        public void CanRetrieveNotebooks()
        {
            var target = new OneNotePersistence();

            var notebooks = target.LoadNotebooks();

            notebooks.Should().NotBeNull("Notebooks should have been loaded");

            notebooks.Notebook.Should().NotBeEmpty("it should have found at least one Notebook");
        }
Example #2
0
        public void CanParseHierarchyStructure()
        {
            var target = new OneNotePersistence();

            var notebooks = target.LoadNotebooks();

            var notebook = notebooks.Notebook[0];

            var sectionGroupAndSectionCount = notebook.SectionGroup.Length + notebook.Section.Length;

            var notebookTreeItem = new NotebookTreeItem(notebooks.Notebook[0], 0);

            notebookTreeItem.Should().NotBeNull();

            notebookTreeItem.Children.Should().HaveCount(sectionGroupAndSectionCount);
        }