Esempio n. 1
0
        public async Task <IEnumerable <ClaimDocument> > Handle(GetClaimsQuery request, CancellationToken cancellationToken)
        {
            string query  = "SELECT * FROM c";
            var    claims = await _cosmosDbClaimDocumentService.GetItemsAsync(query);

            return(claims);
        }
Esempio n. 2
0
        public async Task Test_GetClaimsQuery_ReturnClaimsIfAny()
        {
            var service = await TestHelper.GetCosmosDbClaimDocumentService();

            GetClaimsQuery query = new GetClaimsQuery();

            var handler = new GetClaimsQueryHandler(service);

            var results = await handler.Handle(query, CancellationToken.None);

            Assert.GreaterOrEqual(results.Count(), 0);
        }