public void GetBytesExtension() { 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 = string.Format("{0}.jpeg", Guid.NewGuid()); var uri = container.Save(id, bytes, "na"); var returned = container.GetBytes(id); Assert.IsTrue(bytes.ContentEquals(returned)); }
public void SaveWithTimeOut() { var bytes = new byte[256]; Random random = new Random(); random.NextBytes(bytes); var containerName = "aslasdasdkdjh"; var container = new BinaryContainer(CloudStorageAccount.DevelopmentStorageAccount, containerName); container.EnsureExist(); var id = Guid.NewGuid().ToString(); var uri = container.Save(id, bytes, "na", new TimeSpan(0, 1, 0)); var returned = container.GetBytes(id); Assert.IsTrue(bytes.ContentEquals(returned)); }
public void GetBytesNullId() { var container = new BinaryContainer(CloudStorageAccount.DevelopmentStorageAccount, "asdas"); container.GetBytes(StringHelper.NullEmptyWhiteSpace()); }