public void ConstructorValid () { string fileName; fileName = Path.Combine (pathTest, "Accel.xml"); EcmaReader reader = new EcmaReader (fileName); Assert.IsInstanceOfType (type, reader, "CV02"); Assert.IsNotNull (reader, "CV02"); }
public void ConstructorValid() { string fileName; fileName = Path.Combine(pathTest, "Accel.xml"); EcmaReader reader = new EcmaReader(fileName); Assert.IsInstanceOfType(type, reader, "CV02"); Assert.IsNotNull(reader, "CV02"); }
public void ConstructorInvalid() { EcmaReader reader = null; try { reader = new EcmaReader(String.Empty); } catch { } Assert.IsNotInstanceOfType(type, reader, "CI01"); Assert.IsNull(reader, "CI02"); }
public void ConstructorInvalid () { EcmaReader reader = null; try { reader = new EcmaReader (String.Empty); } catch { } Assert.IsNotInstanceOfType (type, reader, "CI01"); Assert.IsNull (reader, "CI02"); }
public MonoDocument (string filePath) { EcmaReader reader = new EcmaReader (filePath); valid_document = reader.Valid; if (!valid_document) throw new ArgumentException ("Error: Invalid XML document.", "filePath"); filename = Path.GetFileName (filePath); using (FileStream filestream= new FileStream (filePath, FileMode.Open)) { using (StreamReader stream = new StreamReader (filestream)) { xml_content = stream.ReadToEnd (); } } }
public MonoDocument(string filePath) { EcmaReader reader = new EcmaReader(filePath); valid_document = reader.Valid; if (!valid_document) { throw new ArgumentException("Error: Invalid XML document.", "filePath"); } filename = Path.GetFileName(filePath); using (FileStream filestream = new FileStream(filePath, FileMode.Open)) { using (StreamReader stream = new StreamReader(filestream)) { xml_content = stream.ReadToEnd(); } } }