public void CreateEmptyBlockTypeManager()
        {
            // Arrange
            var project = new Project();

            // Act
            var manager = new BlockTypeSupervisor(project);

            // Assert
            Assert.AreEqual(project, manager.Project);
        }
        protected void SetupComplexMultilineTest(
			out ProjectBlockCollection blocks,
			out BlockTypeSupervisor blockTypes,
			out BlockCommandSupervisor commands,
			int lineCount = 10)
        {
            // Everything is based on the project.
            var project = new Project();

            blocks = project.Blocks;
            commands = project.Commands;
            blockTypes = project.BlockTypes;

            // Set up the structure and insert the lines.
            SetupComplexMultilineTest(project, lineCount);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="Project"/> class.
        /// </summary>
        public Project(
			ProjectProcessingState initialProcessingState =
				ProjectProcessingState.Interactive)
        {
            // Set up the initial states.
            ProcessingState = initialProcessingState;

            // We need the settings set up first since it may contribute
            // to the loading of other components of the project.
            Settings = new ProjectSettings();
            Properties = new PropertiesDictionary();
            BlockTypes = new BlockTypeSupervisor(this);
            Blocks = new ProjectBlockCollection(this);
            Commands = new BlockCommandSupervisor(this);
            Plugins = new PluginSupervisor(this);
            Macros = new ProjectMacros();
        }
        /// <summary>
        /// Creates a project with a set number of lines and gives them a state that
        /// can easily be tested for.
        /// </summary>
        /// <param name="context"></param>
        /// <param name="blocks">The block collection in the project.</param>
        /// <param name="blockTypes">The block types supervisor for the project.</param>
        /// <param name="commands">The commands supervisor for the project.</param>
        /// <param name="lineCount">The number of blocks to insert into the projects.</param>
        protected void SetupMultilineTest(
			out BlockCommandContext context,
			out ProjectBlockCollection blocks,
			out BlockTypeSupervisor blockTypes,
			out BlockCommandSupervisor commands,
			int lineCount = 4)
        {
            // Everything is based on the project.
            var project = new Project();

            context = new BlockCommandContext(project);
            blocks = project.Blocks;
            commands = project.Commands;
            blockTypes = project.BlockTypes;

            // Insert the bulk of the lines.
            InsertLines(project, lineCount);

            // Go through and set up the block types for these elements.
            project.Blocks[0].SetBlockType(blockTypes.Chapter);

            for (int index = 1;
                index < project.Blocks.Count;
                index++)
            {
                project.Blocks[index].SetBlockType(blockTypes.Scene);
            }
        }