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");
	}
示例#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");
        }
示例#3
0
        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");
	}
示例#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 ();
			}
		}
	}
示例#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();
                }
            }
        }