Beispiel #1
0
        public void LoadMakesProjectNotDirty()
        {
            project.AddConfig("Debug");
            doc.Save(xmlfile);
            ProjectDocument doc2 = new ProjectDocument(xmlfile);

            doc2.Load();
            Assert.IsFalse(doc2.HasUnsavedChanges);
        }
Beispiel #2
0
        public void CanSaveAndReloadProject()
        {
            doc.LoadXml(NUnitProjectXml.NormalProject);
            doc.Save(xmlfile);
            Assert.IsTrue(File.Exists(xmlfile));

            ProjectDocument doc2 = new ProjectDocument(xmlfile);

            doc2.Load();
            ProjectModel project2 = new ProjectModel(doc2);

            Assert.AreEqual(2, project2.Configs.Count);

            Assert.AreEqual(2, project2.Configs[0].Assemblies.Count);
            Assert.AreEqual("assembly1.dll", project2.Configs[0].Assemblies[0]);
            Assert.AreEqual("assembly2.dll", project2.Configs[0].Assemblies[1]);

            Assert.AreEqual(2, project2.Configs[1].Assemblies.Count);
            Assert.AreEqual("assembly1.dll", project2.Configs[1].Assemblies[0]);
            Assert.AreEqual("assembly2.dll", project2.Configs[1].Assemblies[1]);
        }
 public void LoadMakesProjectNotDirty()
 {
     project.AddConfig("Debug");
     doc.Save(xmlfile);
     ProjectDocument doc2 = new ProjectDocument(xmlfile);
     doc2.Load();
     Assert.IsFalse(doc2.HasUnsavedChanges);
 }
        public void CanSaveAndReloadProject()
        {
            doc.LoadXml(NUnitProjectXml.NormalProject);
            doc.Save(xmlfile);
            Assert.IsTrue(File.Exists(xmlfile));

            ProjectDocument doc2 = new ProjectDocument(xmlfile);
            doc2.Load();
            ProjectModel project2 = new ProjectModel(doc2);

            Assert.AreEqual(2, project2.Configs.Count);

            Assert.AreEqual(2, project2.Configs[0].Assemblies.Count);
            Assert.AreEqual("assembly1.dll", project2.Configs[0].Assemblies[0]);
            Assert.AreEqual("assembly2.dll", project2.Configs[0].Assemblies[1]);

            Assert.AreEqual(2, project2.Configs[1].Assemblies.Count);
            Assert.AreEqual("assembly1.dll", project2.Configs[1].Assemblies[0]);
            Assert.AreEqual("assembly2.dll", project2.Configs[1].Assemblies[1]);
        }