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"); }
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()); }