Esempio n. 1
0
        public async Task CanUpdateItem_OK()
        {
            CosmosDbService();
            var request = new UnitTestItemModel()
            {
                UserId   = "5117791c-8321-49f5-8e2c-d241053b8f20",
                FullName = "updated",
                Id       = "0435eb07-035a-42c8-a4f7-94d664c712f4"
            };
            var result = await _cosmosDb.UpdateItemAsync(request, new PartitionKey("0435eb07-035a-42c8-a4f7-94d664c712f4"));

            _testOutputHelper.WriteLine(JsonConvert.SerializeObject(result));
            Assert.NotNull(result);
        }
Esempio n. 2
0
        public async Task CanAddItem_OK()
        {
            CosmosDbService();

            var request = new UnitTestItemModel()
            {
                UserId   = Guid.NewGuid().ToString(),
                FullName = "teeest",
                Id       = Guid.NewGuid().ToString()
            };

            _testOutputHelper.WriteLine(request.Id);
            await _cosmosDb.AddItemAsync(request);
        }