Esempio n. 1
0
        public void Read_Source_XML_If_File_Is_Invalid()
        {
            DataProviderSettings settings = new DataProviderSettings();

            settings.Location = "sdlkfjsdljf";
            xmlConnection     = new XMLConnection(settings);

            XmlReader expected = null;
            var       actual   = (string)xmlConnection.Read(null);

            Assert.AreEqual(expected, actual);
        }
Esempio n. 2
0
        public void Read_Source_XML_If_File_Exists()
        {
            DataProviderSettings settings = new DataProviderSettings();

            settings.Location = "C:\\Dev\\DevApps\\StatSnapShotter\\StatSnapShotter\\StatConfiguration.xml";
            xmlConnection     = new XMLConnection(settings);

            var expected = true;
            var actual   = (XmlReader)xmlConnection.Read(null);

            Assert.AreEqual(expected, actual != null);
        }
Esempio n. 3
0
        public void Read_Source_XML_If_File_Does_Not_Exist()
        {
            DataProviderSettings settings = new DataProviderSettings();

            settings.Location = "test.txt";
            xmlConnection     = new XMLConnection(settings);

            XmlReader expected = null;
            var       actual   = (string)xmlConnection.Read(null);

            Assert.AreEqual(expected, actual);
        }