public void ExecuteCommandRemoveBlobTest() { AddTestBlobs(); string containerName = "container20"; string blobName = "blob0"; command.Container = containerName; command.Blob = blobName; RunAsyncCommand(() => command.ExecuteCmdlet()); string result = (string)MockCmdRunTime.VerboseStream.FirstOrDefault(); Assert.AreEqual(String.Format(Resources.RemoveBlobSuccessfully, blobName, containerName), result); RunAsyncCommand(() => command.ExecuteCmdlet()); Assert.AreEqual(String.Format(Resources.BlobNotFound, blobName, containerName), MockCmdRunTime.ErrorStream[0].Exception.Message); }
public void ExecuteCommandRemoveBlobTest() { AddTestBlobs(); string containerName = "container20"; string blobName = "blob0"; command.Container = containerName; command.Blob = blobName; command.ExecuteCmdlet(); string result = (string)((MockCommandRuntime)command.CommandRuntime).VerboseStream.FirstOrDefault(); Assert.AreEqual(String.Format(Resources.RemoveBlobSuccessfully, blobName, containerName), result); AssertThrows <ResourceNotFoundException>(() => command.ExecuteCmdlet(), String.Format(Resources.BlobNotFound, blobName, containerName)); }