Esempio n. 1
0
	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");
	}
Esempio n. 2
0
        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");
        }
Esempio n. 3
0
        public void ConstructorInvalid()
        {
            EcmaReader reader = null;

            try {
                reader = new EcmaReader(String.Empty);
            } catch {
            }

            Assert.IsNotInstanceOfType(type, reader, "CI01");
            Assert.IsNull(reader, "CI02");
        }
Esempio n. 4
0
	public void ConstructorInvalid ()
	{
		EcmaReader reader = null;
		
		try {
			reader = new EcmaReader (String.Empty);
		} catch {
		}
		
		Assert.IsNotInstanceOfType (type, reader, "CI01");
		Assert.IsNull (reader, "CI02");
	}
Esempio n. 5
0
	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 ();
			}
		}
	}
Esempio n. 6
0
        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();
                }
            }
        }