Exemple #1
0
        public void OriginalFileIOTest()
        {
            IFileIO fileo = new FileProperties ();
            fileo.SetValue ("Year", "2013");
            fileo.SetValue ("Month", "05");
            fileo.SetValue ("Day", "02");
            fileo.WriteToFile ("FileIOExample.txt");

            IFileIO filei = new FileProperties ();
            filei.ReadFromFile("FileIOExample.txt");
            Console.WriteLine (filei.GetValue ("Year"));
            Console.WriteLine (filei.GetValue ("Month"));
            Console.WriteLine (filei.GetValue ("Day"));
        }
Exemple #2
0
 public void ReadFromFileTests(string fileName, string key, string expected)
 {
     var _sut = new FileProperties ();
     _sut.ReadFromFile (fileName);
     Assert.That (_sut.GetValue (key), Is.EqualTo (expected));
 }