public void TestFileServiceOpenFileAndSave()
 {
     var fileName = "TestOpenFileAndSave.txt";
     var fs = new FileService();
     var stream = fs.OpenFile(fileName);
     Assert.IsNotNull(stream, "FileService OpenFile did not return an object");
     var sw = new StreamWriter(stream);
     sw.WriteLine("Testing testing");
     sw.Flush();
     sw.Close();
     stream.Close();
     stream = fs.OpenFile(fileName);
     var sr = new StreamReader(stream);
     var readValue = sr.ReadToEnd();
     Assert.IsFalse(string.IsNullOrEmpty(readValue), "No text was read from the saved file");
     stream.Close();
 }
 public void TestFileServiceOpenFile()
 {
     var fs = new FileService();
     var stream = fs.OpenFile("TestOpenFile.txt");
     Assert.IsNotNull(stream, "FileService OpenFile did not return an object");
     stream.Close();
 }
 public void TestFileServiceDeleteOpenedFile()
 {
     var fs = new FileService();
     Assert.IsNotNull(fs, "FileService ctor did not return an object");
     fs.DeleteFile("TestOpenFile.txt");
 }
 public void TestFileServiceCtor()
 {
     var fs = new FileService();
     Assert.IsNotNull(fs, "FileService ctor did not return an object");
 }
 public void TestDeleteDirectory()
 {
     var fs = new FileService();
     fs.DeleteDirectory("TestDirectory");
 }
 public void TestCreateDirectory()
 {
     var fs = new FileService();
     fs.CreateDirectory("TestDirectory");
 }