{"id":15011615,"url":"https://github.com/gpreviatti/json-resource-attribute-package","last_synced_at":"2026-02-11T13:33:04.003Z","repository":{"id":217346692,"uuid":"743662529","full_name":"gpreviatti/json-resource-attribute-package","owner":"gpreviatti","description":"This simple package that exposes an attribute to helps testing with json files","archived":false,"fork":false,"pushed_at":"2024-01-23T19:41:04.000Z","size":43,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-16T13:05:03.835Z","etag":null,"topics":["chsarp","dotnet","nuget","nuget-package","tdd","test","testing","xunit"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gpreviatti.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-01-15T18:03:57.000Z","updated_at":"2024-01-16T12:05:07.000Z","dependencies_parsed_at":"2024-09-11T22:38:49.935Z","dependency_job_id":"7e342d9d-7adb-4fc6-9c80-052f85bcd4e9","html_url":"https://github.com/gpreviatti/json-resource-attribute-package","commit_stats":null,"previous_names":["gpreviatti/json-resource-attribute-package"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gpreviatti/json-resource-attribute-package","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpreviatti%2Fjson-resource-attribute-package","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpreviatti%2Fjson-resource-attribute-package/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpreviatti%2Fjson-resource-attribute-package/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpreviatti%2Fjson-resource-attribute-package/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gpreviatti","download_url":"https://codeload.github.com/gpreviatti/json-resource-attribute-package/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpreviatti%2Fjson-resource-attribute-package/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29333536,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T12:42:24.625Z","status":"ssl_error","status_checked_at":"2026-02-11T12:41:23.344Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["chsarp","dotnet","nuget","nuget-package","tdd","test","testing","xunit"],"created_at":"2024-09-24T19:41:20.806Z","updated_at":"2026-02-11T13:33:03.987Z","avatar_url":"https://github.com/gpreviatti.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Json Resource Attribute Package\n\n[![Publish in Nuget.org](https://github.com/gpreviatti/json-resource-attribute-package/actions/workflows/publish.yml/badge.svg)](https://github.com/gpreviatti/json-resource-attribute-package/actions/workflows/publish.yml)\n\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=gpreviatti_json-resource-attribute-package\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=gpreviatti_json-resource-attribute-package)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=gpreviatti_json-resource-attribute-package\u0026metric=bugs)](https://sonarcloud.io/summary/new_code?id=gpreviatti_json-resource-attribute-package)\n[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=gpreviatti_json-resource-attribute-package\u0026metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=gpreviatti_json-resource-attribute-package)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=gpreviatti_json-resource-attribute-package\u0026metric=code_smells)](https://sonarcloud.io/summary/new_code?id=gpreviatti_json-resource-attribute-package)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=gpreviatti_json-resource-attribute-package\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=gpreviatti_json-resource-attribute-package)\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=gpreviatti_json-resource-attribute-package\u0026metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=gpreviatti_json-resource-attribute-package)\n\nThis simple package that exposes an attribute to helps testing with json files.\n\n## How to use\n\nInstall package in test project and add this block in your csproj file in order to copy your json files into the debug folder\n\n```xml\n\u003cItemGroup\u003e\n\t\u003cNone Remove=\"**\\*.json\" /\u003e\n\t\u003cEmbeddedResource Include=\"**\\*.json\" Exclude=\"bin\\**;obj\\**\" /\u003e\n\u003c/ItemGroup\u003e\n```\n\nYou should create a json file and add the node with a name that will be identified by the test in the example the name is `majorAge`\n\nDecorate your test method with `JsonResourceData` attribute, add the json file reference and test node name\n\n```csharp\n[Theory(DisplayName = nameof(People_Should_Have_Major_Age))]\n[JsonResourceData(\"json-resource-data-attribute.json\", \"majorAge\")]\npublic void People_Should_Have_Major_Age(Person[] people, bool expected)\n{\n    // Arrange, Act\n    var result = people.Any(p =\u003e p.IsMajorAge().Equals(expected));\n\n    // Assert\n    Assert.True(result);\n}\n```\n\n## Samples\n\n[The samples of how to use the json resource attribute are available in test project of package](https://github.com/gpreviatti/json-resource-attribute-package/blob/main/tests/GPreviatti.Util.JsonResourceAttribute.Tests/JsonResourceDataTests.cs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpreviatti%2Fjson-resource-attribute-package","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpreviatti%2Fjson-resource-attribute-package","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpreviatti%2Fjson-resource-attribute-package/lists"}