Exemplo 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");
	}
Exemplo 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");
        }
Exemplo 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");
        }
Exemplo 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");
	}
Exemplo 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 ();
			}
		}
	}
Exemplo 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();
                }
            }
        }