Ejemplo n.º 1
0
        public static Test ReadFromFile(string filename)
        {
            Test test = null;

            using (var stream = new FileStream(filename, FileMode.Open, FileAccess.Read))
            {
                var reader = XmlReader.Create(stream);
                reader.ReadToNextSibling("Test");

                var node = new XmlReaderNode(reader);
                test = TestReader.CreateTest(node, new LazyTestPartCollection(filename));
            }

            test.FileName = filename;

            return(test);
        }
Ejemplo n.º 2
0
        public static Test ReadFromFile(string filename)
        {
            Test test = null;

            using (var stream = new FileStream(filename, FileMode.Open, FileAccess.Read))
            {
                var reader = XmlReader.Create(stream);
                reader.ReadToNextSibling("Test");

                var node = new XmlReaderNode(reader);
                test = TestReader.CreateTest(node, new LazyTestPartCollection(filename));
            }

            test.FileName = filename;

            return test;
        }