Beispiel #1
0
        public void TestMethod2()
        {
            byte[]        strresult;
            pRichTextFile objread          = new pRichTextFile();
            var           currentdirectory = System.IO.Directory.GetParent(Environment.CurrentDirectory).Parent.FullName;

            strresult = objread.getAllBytesfromFile(new clsModel()
            {
                strpath = string.Concat(currentdirectory, @"\files\XMLFileTest.xml")
            });
            Assert.IsNotNull(strresult);

            strresult = objread.getAllBytesfromFile(new clsModel()
            {
                strpath = string.Concat(currentdirectory, @"\files\TextFileTest.txt")
            });
            Assert.IsNotNull(strresult);
        }
Beispiel #2
0
        public void TestMethod1()
        {
            string    strresult        = string.Empty;
            IReadFile objread          = new pRichTextFile();
            var       currentdirectory = Directory.GetParent(Environment.CurrentDirectory).Parent.FullName;

            strresult = objread.getTextonFile(new clsModel()
            {
                strpath = string.Concat(currentdirectory, @"\files\XMLFileTest.xml")
            });
            Assert.IsNotNull(strresult);

            strresult = objread.getTextonFile(new clsModel()
            {
                strpath = string.Concat(currentdirectory, @"\files\TextFileTest.txt")
            });
            Assert.IsNotNull(strresult);
        }