public void GetStream() { var bytes = new byte[256]; Random random = new Random(); random.NextBytes(bytes); var containerName = Guid.NewGuid().ToString().Replace("-", string.Empty); var container = new BinaryContainer(CloudStorageAccount.DevelopmentStorageAccount, containerName); container.EnsureExist(); var id = Guid.NewGuid().ToString(); var uri = container.Save(id, bytes, "na"); using (var stream = container.GetStream(id) as MemoryStream) { var returned = stream.ToArray(); Assert.IsTrue(bytes.ContentEquals(returned)); } }
public void GetStreamNullId() { var container = new BinaryContainer(CloudStorageAccount.DevelopmentStorageAccount, "asdas"); container.GetStream(StringHelper.NullEmptyWhiteSpace()); }