コード例 #1
0
        public void Blob_Object_Exists()
        {
            IAzureBlobObjectContainer <TestBlobObject> testObjectContainer = new AzureBlobObjectContainer <TestBlobObject>(CloudStorageAccount.DevelopmentStorageAccount, "test2");

            var testMessage = new TestBlobObject
            {
                Name  = "Two",
                Price = 250
            };

            testObjectContainer.AddOrReplace(testMessage, "testmessage2");

            var exists = testObjectContainer.Exists("testmessage2");

            Assert.AreEqual(true, exists);
        }
コード例 #2
0
        public void Blob_Object_Exists()
        {
            IAzureBlobObjectContainer<TestBlobObject> testObjectContainer = new AzureBlobObjectContainer<TestBlobObject>(CloudStorageAccount.DevelopmentStorageAccount, "test2");

            var testMessage = new TestBlobObject
            {
                Name = "Two",
                Price = 250
            };

            testObjectContainer.AddOrReplace(testMessage, "testmessage2");

            var exists = testObjectContainer.Exists("testmessage2");

            Assert.AreEqual(true, exists);
        }
コード例 #3
0
        public void Add_Blob_Object()
        {
            IAzureBlobObjectContainer <TestBlobObject> testObjectContainer = new AzureBlobObjectContainer <TestBlobObject>(CloudStorageAccount.DevelopmentStorageAccount, "test");

            var testMessage = new TestBlobObject
            {
                Name  = "Two",
                Price = 250
            };

            testObjectContainer.AddOrReplace(testMessage, "testmessage1");

            var retrieved = testObjectContainer.Get("testmessage1");

            Assert.AreEqual("Two", retrieved.Name);
            Assert.AreEqual(250, retrieved.Price);
        }
コード例 #4
0
        public void Add_Blob_Object()
        {
            IAzureBlobObjectContainer<TestBlobObject> testObjectContainer = new AzureBlobObjectContainer<TestBlobObject>(CloudStorageAccount.DevelopmentStorageAccount, "test");
            
            var testMessage = new TestBlobObject
            {
                Name = "Two",
                Price = 250
            };

            testObjectContainer.AddOrReplace(testMessage, "testmessage1");

            var retrieved = testObjectContainer.Get("testmessage1");

            Assert.AreEqual("Two", retrieved.Name);
            Assert.AreEqual(250, retrieved.Price);
        }
コード例 #5
0
        public void List_Blob_Object()
        {
            IAzureBlobObjectContainer<TestBlobObject> testObjectContainer = new AzureBlobObjectContainer<TestBlobObject>(CloudStorageAccount.DevelopmentStorageAccount, "test3");

            var testMessage = new TestBlobObject
            {
                Name = "Two",
                Price = 250
            };

            testObjectContainer.AddOrReplace(testMessage, "testmessage0/test/test1/test2");
            testObjectContainer.AddOrReplace(testMessage, "testmessage1");
            testObjectContainer.AddOrReplace(testMessage, "testmessage2");

            var names = testObjectContainer.ListNames();
            Assert.AreEqual(3, names.Count);
        }
コード例 #6
0
        public void List_Blob_Object()
        {
            IAzureBlobObjectContainer <TestBlobObject> testObjectContainer = new AzureBlobObjectContainer <TestBlobObject>(CloudStorageAccount.DevelopmentStorageAccount, "test3");

            var testMessage = new TestBlobObject
            {
                Name  = "Two",
                Price = 250
            };

            testObjectContainer.AddOrReplace(testMessage, "testmessage0/test/test1/test2");
            testObjectContainer.AddOrReplace(testMessage, "testmessage1");
            testObjectContainer.AddOrReplace(testMessage, "testmessage2");

            var names = testObjectContainer.ListNames();

            Assert.AreEqual(3, names.Count);
        }