예제 #1
0
        public async Task SendItemAsyncTest()
        {
            var post = new Post {
                PostId = 99999999
            };

            await CosmosService.AddItemToContainerAsync(post);
        }
예제 #2
0
        public async Task DeleteItemAsync()
        {
            var post = new Post {
                PostId = 99999999
            };

            var id = await CosmosService.AddItemToContainerAsync(post);

            await CosmosService.DeleteItemAsync(id, post.PostId.Value.ToString());
        }
예제 #3
0
 public void SendItemAsyncTest_Fail()
 {
     Assert.ThrowsAsync <NullReferenceException>(async() => { await CosmosService.AddItemToContainerAsync(null); });
 }
예제 #4
0
        public void SendItemAsyncTest_InvalidOperationException_Fail()
        {
            var post = new Post();

            Assert.ThrowsAsync <InvalidOperationException>(async() => { await CosmosService.AddItemToContainerAsync(post); });
        }