{"id":18937503,"url":"https://github.com/verifytests/verify.cosmos","last_synced_at":"2025-09-05T08:31:59.357Z","repository":{"id":42576001,"uuid":"331250021","full_name":"VerifyTests/Verify.Cosmos","owner":"VerifyTests","description":"Adds Verify support to verify Azure CosmosDB.","archived":false,"fork":false,"pushed_at":"2024-04-29T16:26:05.000Z","size":351,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-01T09:37:51.794Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VerifyTests.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"VerifyTests"}},"created_at":"2021-01-20T09:05:40.000Z","updated_at":"2024-05-15T15:44:24.846Z","dependencies_parsed_at":"2023-02-10T19:46:24.927Z","dependency_job_id":"693af339-4ba7-435b-bb53-0f6a822e4e6f","html_url":"https://github.com/VerifyTests/Verify.Cosmos","commit_stats":{"total_commits":258,"total_committers":4,"mean_commits":64.5,"dds":0.2558139534883721,"last_synced_commit":"62aeebd52bdb7ff3a9903f925ccb467c4a3c4919"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.Cosmos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.Cosmos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.Cosmos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.Cosmos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VerifyTests","download_url":"https://codeload.github.com/VerifyTests/Verify.Cosmos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232032041,"owners_count":18462966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T12:11:30.339Z","updated_at":"2024-12-31T21:41:51.549Z","avatar_url":"https://github.com/VerifyTests.png","language":"C#","funding_links":["https://github.com/sponsors/VerifyTests"],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"/src/icon.png\" height=\"30px\"\u003e Verify.Cosmos\n\n[![Discussions](https://img.shields.io/badge/Verify-Discussions-yellow?svg=true\u0026label=)](https://github.com/orgs/VerifyTests/discussions)\n[![Build status](https://ci.appveyor.com/api/projects/status/89flq4nfrcmnykd0?svg=true)](https://ci.appveyor.com/project/SimonCropp/Verify-Cosmos)\n[![NuGet Status](https://img.shields.io/nuget/v/Verify.Cosmos.svg)](https://www.nuget.org/packages/Verify.Cosmos/)\n\nAdds [Verify](https://github.com/VerifyTests/Verify) support to verify [Azure CosmosDB](https://docs.microsoft.com/en-us/azure/cosmos-db/).\n\n**See [Milestones](../../milestones?state=closed) for release notes.**\n\n## NuGet package\n\nhttps://nuget.org/packages/Verify.Cosmos/\n\n\n## Usage\n\n\u003c!-- snippet: enable --\u003e\n\u003ca id='snippet-enable'\u003e\u003c/a\u003e\n```cs\n[ModuleInitializer]\npublic static void Init() =\u003e\n    VerifyCosmos.Initialize();\n```\n\u003csup\u003e\u003ca href='/src/Tests/ModuleInitializer.cs#L3-L9' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-enable' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n### ItemResponse\n\nA `ItemResponse` can be verified:\n\n\u003c!-- snippet: ItemResponse --\u003e\n\u003ca id='snippet-ItemResponse'\u003e\u003c/a\u003e\n```cs\nvar response = await container.CreateItemAsync(\n    item,\n    new PartitionKey(item.LastName));\nawait Verify(response);\n```\n\u003csup\u003e\u003ca href='/src/Tests/Tests.cs#L44-L51' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-ItemResponse' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nResulting in:\n\n\u003c!-- snippet: Tests.ItemResponse.verified.txt --\u003e\n\u003ca id='snippet-Tests.ItemResponse.verified.txt'\u003e\u003c/a\u003e\n```txt\n{\n  RequestCharge: 7.4,\n  Headers: {},\n  StatusCode: Created,\n  Resource: {\n    Id: Guid_1,\n    LastName: Andersen,\n    Address: {\n      State: WA,\n      County: King,\n      City: Seattle\n    }\n  }\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Tests.ItemResponse.verified.txt#L1-L14' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Tests.ItemResponse.verified.txt' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n### FeedResponse\n\nA `FeedResponse` can be verified:\n\n\u003c!-- snippet: FeedResponse --\u003e\n\u003ca id='snippet-FeedResponse'\u003e\u003c/a\u003e\n```cs\nusing var iterator = container.GetItemLinqQueryable\u003cFamily\u003e()\n    .Where(b =\u003e b.Id == item.Id)\n    .ToFeedIterator();\nvar feedResponse = await iterator.ReadNextAsync();\nawait Verify(feedResponse);\n```\n\u003csup\u003e\u003ca href='/src/Tests/Tests.cs#L77-L85' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-FeedResponse' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nResulting in:\n\n\u003c!-- snippet: Tests.FeedResponse.verified.txt --\u003e\n\u003ca id='snippet-Tests.FeedResponse.verified.txt'\u003e\u003c/a\u003e\n```txt\n{\n  RequestCharge: 2.8,\n  Count: 1,\n  Headers: {},\n  StatusCode: OK,\n  Resource: [\n    {\n      Id: Guid_1,\n      LastName: Andersen,\n      Address: {\n        State: WA,\n        County: King,\n        City: Seattle\n      }\n    }\n  ]\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Tests.FeedResponse.verified.txt#L1-L17' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Tests.FeedResponse.verified.txt' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n## Icon\n\n[Approval](https://thenounproject.com/term/approval/1759519/) designed by [Mike Zuidgeest](https://thenounproject.com/zuidgeest/) from [The Noun Project](https://thenounproject.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverifytests%2Fverify.cosmos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverifytests%2Fverify.cosmos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverifytests%2Fverify.cosmos/lists"}