예제 #1
0
 public void ItShouldWriteTheFileToTheCloudWithoutErrors()
 {
     var fileStream = "MY TEST STREAM".ToCharArray().Select(Convert.ToByte).ToArray();
     var memoryStream = new MemoryStream(fileStream);
     var fileManager = new FileManager(CredentialsHelper.GetCredentials());
     fileManager.SaveFile(memoryStream, "SampleStream.txt");
 }
예제 #2
0
 public void ItShouldReadTheFileFromTheCloudWithoutErrors()
 {
     var fileManager = new FileManager(CredentialsHelper.GetCredentials());
     var stream = fileManager.ReadFile("SampleStream.txt");
     var streamReader = new StreamReader(stream);
     Assert.IsNotNullOrEmpty(streamReader.ReadToEnd());
 }
 public void ItShouldAuthenticateWithValidCredentialsInXmlFile()
 {
     var credentials = CredentialsHelper.GetCredentials();
     var fileManager = new FileManager(credentials);
     Assert.IsTrue(fileManager.Authenticate());
 }