示例#1
0
        public void CreateTest()
        {
            TestFile     testFile = new TestFile();
            TestFileData filedata = new TestFileData();

            testFile.CreateFile(@"\\192.168.16.50\bazaotd\Давыдов Д.В\testFile.tst");
        }
示例#2
0
文件: TestFile.cs 项目: pents/Libs
        public void WriteToFile(TestFileData data, string path)
        {
            //CreateFile(path);

            base.WriteToFile(path, data.Day.ToString());
            base.WriteToFile(path, data.Month.ToString());
            base.WriteToFile(path, data.Year.ToString());
        }
示例#3
0
        public void ReadFile()
        {
            TestFile     testFile = new TestFile();
            TestFileData filedata = testFile.ReadFile(@"\\192.168.16.50\bazaotd\Давыдов Д.В\testFile.tst");

            Assert.AreEqual(filedata.Day, 1);
            Assert.AreEqual(filedata.Month, 8);
            Assert.AreEqual(filedata.Year, 2018);
        }
示例#4
0
        public void WriteFile()
        {
            TestFile     testFile = new TestFile();
            TestFileData filedata = new TestFileData();

            filedata.Day   = 1;
            filedata.Month = 8;
            filedata.Year  = 2018;
            testFile.WriteToFile(filedata, @"\\192.168.16.50\bazaotd\Давыдов Д.В\testFile.tst");
        }
示例#5
0
文件: TestFile.cs 项目: pents/Libs
        public new TestFileData ReadFile(string filePath)
        {
            TestFileData testData = new TestFileData();

            string[] data = base.ReadFile(filePath);

            testData.Day   = int.Parse(data[0]);
            testData.Month = int.Parse(data[1]);
            testData.Year  = int.Parse(data[2]);
            base.data      = testData;

            return(testData);
        }