Example #1
0
        public void SaveReadOnly4()
        {
            var doc = new XmlDocumentWithLocation(loadAsReadOnly: true);

            doc.Load(_pathToCommonTargets);
            doc.Save(XmlWriter.Create(FileUtilities.GetTemporaryFile()));
        }
Example #2
0
        public void SaveReadOnly3()
        {
            var doc = new XmlDocumentWithLocation(loadAsReadOnly: true);

            doc.Load(_pathToCommonTargets);
            doc.Save(new StringWriter());
        }
Example #3
0
        public void SaveReadOnly2()
        {
            var doc = new XmlDocumentWithLocation(loadAsReadOnly: true);

            doc.Load(_pathToCommonTargets);
            doc.Save(new MemoryStream());
        }
 public void SaveReadOnly4()
 {
     Assert.Throws <InvalidOperationException>(() =>
     {
         var doc = new XmlDocumentWithLocation(loadAsReadOnly: true);
         doc.Load(_pathToCommonTargets);
         doc.Save(XmlWriter.Create(FileUtilities.GetTemporaryFile()));
     }
                                               );
 }
 public void SaveReadOnly3()
 {
     Assert.Throws <InvalidOperationException>(() =>
     {
         var doc = new XmlDocumentWithLocation(loadAsReadOnly: true);
         doc.Load(_pathToCommonTargets);
         doc.Save(new StringWriter());
     }
                                               );
 }