public void WhenIUpdateTheSameReferenceInAProjectTheReferenceIsTheSame()
        {
            VS10ProjectWriter pr = new VS10ProjectWriter(vs10withOneFileReference);

            FileReference newRef = new FileReference("nunit.framework","2.6.1.12217",@"libs\nunit.framework.dll");
            String projectXML = pr.UpdateReference(newRef);

            VS10ProjectReader prReader = new VS10ProjectReader();
            List<FileReference> refs = prReader.FindFileReferences(projectXML);
            Assert.AreEqual(@"libs\nunit.framework.dll", refs[0].Path);
            Assert.AreEqual("2.6.1.12217", refs[0].Version);
        }
        public void ICanUpdateAReferenceWithoutVersion()
        {
            VS10ProjectWriter pr = new VS10ProjectWriter(vs10withOneFileReferenceWithoutVersion);

            FileReference newRef = new FileReference("core", "1.2", @"R:\Core\1.2\NET35\core.dll");
            String projectXML = pr.UpdateReference(newRef);

            Assert.IsTrue(projectXML.IndexOf("<Reference Include=\"core\"") > 0);
            VS10ProjectReader prReader = new VS10ProjectReader();
            List<FileReference> refs = prReader.FindFileReferences(projectXML);
            Assert.AreEqual(@"R:\Core\1.2\NET35\core.dll", refs[0].Path);
            Assert.AreEqual(null, refs[0].Version);
            Assert.AreEqual("core", refs[0].Name);
        }
        public void ICanUpdateAReferenceWithUnderscoreSeparator()
        {
            VS10ProjectWriter pr = new VS10ProjectWriter(vs10withOneFileReferenceWithUnderscoreSeparatorInThePath);

            FileReference newRef = new FileReference("core", "1.2", @"R:\Core\1.2\NET35\core.dll");
            String projectXML = pr.UpdateReference(newRef);

            VS10ProjectReader prReader = new VS10ProjectReader();
            List<FileReference> refs = prReader.FindFileReferences(projectXML);
            Assert.AreEqual(@"R:\Core\1.2\NET35\core.dll", refs[0].Path);
            Assert.AreEqual("core", refs[0].Name);
        }