コード例 #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());
 }
コード例 #3
0
 public void ItShouldAuthenticateWithValidCredentialsInXmlFile()
 {
     var credentials = CredentialsHelper.GetCredentials();
     var fileManager = new FileManager(credentials);
     Assert.IsTrue(fileManager.Authenticate());
 }