public void CanStoreAndRetrieve()
        {
            var store = new AzureCollectionStore<TestCollectionEntity>(ConnectionString);
            var id = Guid.NewGuid().ToString("N");
            store.InsertAsync(new TestCollectionEntity()
            {
                Id = id
            }).Wait();

            Assert.True(store.ExistsAsync(id).Result);

            var t = store.GetAsync(id).Result;
            Assert.Equal(id, t.Id);
        }
        public async Task CanStoreAndRemoved()
        {
            var store = new AzureCollectionStore <TestCollectionEntity>(ConnectionString);
            var id    = Guid.NewGuid().ToString("N");
            var t     = new TestCollectionEntity()
            {
                Id = id
            };
            await store.InsertAsync(t);

            await store.DeleteAsync(t);

            Assert.False(await store.ExistsAsync(id));
            await Assert.ThrowsAsync <AggregateException>(() => store.GetAsync(id));
        }
        public async Task CanStoreAndRetrieve()
        {
            var store = new AzureCollectionStore <TestCollectionEntity>(ConnectionString);
            var id    = Guid.NewGuid().ToString("N");
            await store.InsertAsync(new TestCollectionEntity()
            {
                Id = id
            });

            Assert.True(await store.ExistsAsync(id));

            var t = await store.GetAsync(id);

            Assert.Equal(id, t.Id);
        }
        public void CanStoreAndRemoved()
        {
            var store = new AzureCollectionStore<TestCollectionEntity>(ConnectionString);
            var id = Guid.NewGuid().ToString("N");
            var t = new TestCollectionEntity()
            {
                Id = id
            };
            store.InsertAsync(t).Wait();

            store.DeleteAsync(t).Wait();

            Assert.False(store.ExistsAsync(id).Result);
            Assert.Throws<AggregateException>(() => store.GetAsync(id).Result);
        }
Beispiel #5
0
        public void CanStoreAndRemoved()
        {
            var store = new AzureCollectionStore <TestCollectionEntity>(ConnectionString);
            var id    = Guid.NewGuid().ToString("N");
            var t     = new TestCollectionEntity()
            {
                Id = id
            };

            store.InsertAsync(t).Wait();

            store.DeleteAsync(t).Wait();

            Assert.False(store.ExistsAsync(id).Result);
            Assert.Throws <AggregateException>(() => store.GetAsync(id).Result);
        }
Beispiel #6
0
        public void CanStoreAndRetrieve()
        {
            var store = new AzureCollectionStore <TestCollectionEntity>(ConnectionString);
            var id    = Guid.NewGuid().ToString("N");

            store.InsertAsync(new TestCollectionEntity()
            {
                Id = id
            }).Wait();

            Assert.True(store.ExistsAsync(id).Result);

            var t = store.GetAsync(id).Result;

            Assert.Equal(id, t.Id);
        }