예제 #1
0
        public void FilePathConstructorTest2()
        {
            FilePath_Accessor target = new FilePath_Accessor();

            Assert.AreEqual(null, target.DataRoot);
            Assert.AreEqual(null, target.Absolute);
            Assert.AreEqual(null, target.Relative);
        }
예제 #2
0
        public void GetSchemaTest()
        {
            IXmlSerializable target   = new FilePath_Accessor();
            XmlSchema        expected = null;
            XmlSchema        actual;

            actual = target.GetSchema();
            Assert.AreEqual(expected, actual);
        }
예제 #3
0
        public void DataRootSetsAbsolutePathIfRelativeIsAlreadySet()
        {
            FilePath_Accessor target = new FilePath_Accessor();

            string absolute = @"C:\Foo\Stuff.xml";
            string dataRoot = @"C:\Foo";
            string relative = @"Stuff.xml";

            target.Relative = relative;
            target.SetDataRoot(dataRoot, true);

            Assert.AreEqual(absolute, target.Absolute);
        }
예제 #4
0
        public void ReadNonVersionedTest()
        {
            FilePath_Accessor target = new FilePath_Accessor(); // TODO: Initialize to an appropriate value

            using (var reader = System.Xml.XmlReader.Create("NonVersionedFilePath.xml"))
            {
                XPathDocument  doc = new XPathDocument(reader);
                XPathNavigator nav = doc.CreateNavigator();
                target.ReadNonVersioned(nav);
            }

            Assert.AreEqual(@"C:\Foo\Stuff.xml", target.Absolute);
            Assert.AreEqual(null, target.Relative);
            Assert.AreEqual(null, target.DataRoot);
        }
예제 #5
0
 public void GetSchemaTest()
 {
     IXmlSerializable target = new FilePath_Accessor();
     XmlSchema expected = null;
     XmlSchema actual;
     actual = target.GetSchema();
     Assert.AreEqual(expected, actual);
 }
예제 #6
0
        public void ReadNonVersionedTest()
        {
            FilePath_Accessor target = new FilePath_Accessor(); // TODO: Initialize to an appropriate value

            using (var reader = System.Xml.XmlReader.Create("NonVersionedFilePath.xml"))
            {
                XPathDocument doc = new XPathDocument(reader);
                XPathNavigator nav = doc.CreateNavigator();
                target.ReadNonVersioned(nav);
            }

            Assert.AreEqual(@"C:\Foo\Stuff.xml", target.Absolute);
            Assert.AreEqual(null, target.Relative);
            Assert.AreEqual(null, target.DataRoot);
        }
예제 #7
0
        public void DataRootSetsAbsolutePathIfRelativeIsAlreadySet()
        {
            FilePath_Accessor target = new FilePath_Accessor();

            string absolute = @"C:\Foo\Stuff.xml";
            string dataRoot = @"C:\Foo";
            string relative = @"Stuff.xml";
            target.Relative = relative;
            target.SetDataRoot(dataRoot, true);

            Assert.AreEqual(absolute, target.Absolute);
        }
예제 #8
0
 public void FilePathConstructorTest2()
 {
     FilePath_Accessor target = new FilePath_Accessor();
     Assert.AreEqual(null, target.DataRoot);
     Assert.AreEqual(null, target.Absolute);
     Assert.AreEqual(null, target.Relative);
 }