Beispiel #1
0
        public void SolutionSaveRestoreTest()
        {
            var solution = DataGenerator.CreateSolution();

            Assert.IsNotNull(solution, "Failed creating Solution.");

            // Keep source ToString
            var src = solution.ToString();

            // Start edit
            solution.BeginEdit();

            solution.SolutionName  = "edited";
            solution.Path          = "edited";
            solution.Task          = (Lists.CreateTasks() as List <string>)[1];
            solution.Configuration = (Lists.CreateConfigurations() as List <string>)[1];
            solution.Platform      = (Lists.CreatePlatforms() as List <string>)[1];
            solution.Condition     = (Lists.CreateConditions() as List <string>)[1];

            // Cancel edit.
            solution.CancelEdit();

            // Check.
            Assert.AreEqual(src, solution.ToString(), "Failed save/restore");
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance Model class.
        /// </summary>
        /// <param name="solution">The Solution.</param>
        public Model(Data.Solution solution)
        {
            Solution = solution;

            TaskList          = Lists.CreateTasks();
            PlatformList      = Lists.CreatePlatforms();
            ConfigurationList = Lists.CreateConfigurations();
            ConditionList     = Lists.CreateConditions();
        }