public void WriteObjectWithStorageContextWithNullContextTest()
        {
            AzureStorageBase item = new AzureStorageBase();
            command.WriteObjectWithStorageContext(item);

            AzureStorageBase contextItem = (AzureStorageBase)MockCmdRunTime.OutputPipeline.FirstOrDefault();
            Assert.IsNotNull(contextItem);
            Assert.IsNull(contextItem.Context);
        }
        public void WriteObjectWithStorageContextWithNullContextTest()
        {
            AzureStorageBase item = new AzureStorageBase();

            command.WriteObjectWithStorageContext(item);

            AzureStorageBase contextItem = (AzureStorageBase)MockCmdRunTime.OutputPipeline.FirstOrDefault();

            Assert.IsNotNull(contextItem);
            Assert.IsNull(contextItem.Context);
        }
        public void WriteObjectWithStorageContextWithContextTest()
        {
            CloudStorageAccount account = CloudStorageAccount.DevelopmentStorageAccount;
            command.Context = new AzureStorageContext(account);

            AzureStorageBase item = new AzureStorageBase();
            command.WriteObjectWithStorageContext(item);

            AzureStorageBase contextItem = (AzureStorageBase)MockCmdRunTime.OutputPipeline.FirstOrDefault();
            Assert.IsNotNull(contextItem);
            Assert.AreEqual(command.Context, contextItem.Context);
        }
        public void WriteObjectWithStorageContextWithContextTest()
        {
            CloudStorageAccount account = CloudStorageAccount.DevelopmentStorageAccount;

            command.Context = new AzureStorageContext(account);

            AzureStorageBase item = new AzureStorageBase();

            command.WriteObjectWithStorageContext(item);

            AzureStorageBase contextItem = (AzureStorageBase)MockCmdRunTime.OutputPipeline.FirstOrDefault();

            Assert.IsNotNull(contextItem);
            Assert.AreEqual(command.Context, contextItem.Context);
        }
        /// <summary>
        /// Output azure storage object with storage context
        /// </summary>
        /// <param name="item">An AzureStorageBase object</param>
        internal void WriteObjectWithStorageContext(AzureStorageBase item)
        {
            item.Context = Context;

            WriteObject(item);
        }