{"id":28579017,"url":"https://github.com/dotnet-campus/cunit","last_synced_at":"2025-10-16T17:32:45.059Z","repository":{"id":43734935,"uuid":"121082807","full_name":"dotnet-campus/CUnit","owner":"dotnet-campus","description":"CUnit is short for Contracted Unit Test which means you only specify the contracts of a method then you can get the unit test results of the contracts. (或者你也可以称 Chinese Unit Test)","archived":false,"fork":false,"pushed_at":"2023-08-10T08:38:29.000Z","size":724,"stargazers_count":44,"open_issues_count":3,"forks_count":7,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-06-10T08:54:19.107Z","etag":null,"topics":["dotnet-core","dotnetstandard","mstest","uwp","wpf"],"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/dotnet-campus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-11T04:04:03.000Z","updated_at":"2025-04-23T05:13:51.000Z","dependencies_parsed_at":"2022-08-22T11:20:12.676Z","dependency_job_id":null,"html_url":"https://github.com/dotnet-campus/CUnit","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-campus%2FCUnit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-campus%2FCUnit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-campus%2FCUnit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-campus%2FCUnit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotnet-campus","download_url":"https://codeload.github.com/dotnet-campus/CUnit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-campus%2FCUnit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259182351,"owners_count":22818096,"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":["dotnet-core","dotnetstandard","mstest","uwp","wpf"],"created_at":"2025-06-11T01:37:44.973Z","updated_at":"2025-10-16T17:32:44.978Z","avatar_url":"https://github.com/dotnet-campus.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[English][en]|[日本語][jp]|[简体中文][zh-chs]|[繁體中文][zh-cht]\n-|-|-|-\n\n[en]: /README.md\n[jp]: /docs/jp/README.jp.md\n[zh-chs]: /docs/zh-chs/README.zh-chs.md\n[zh-cht]: /docs/zh-cht/README.zh-cht.md\n\n![.NET Build \u0026 Test](https://github.com/dotnet-campus/CUnit/workflows/.NET%20Build%20\u0026%20Test/badge.svg) ![NuGet Push](https://github.com/dotnet-campus/CUnit/workflows/NuGet%20Push/badge.svg) \n\n\n| Name | NuGet|\n|--|--|\n|MSTestEnhancer|[![](https://img.shields.io/nuget/v/MSTestEnhancer.svg)](https://www.nuget.org/packages/MSTestEnhancer)|\n|dotnetCampus.UITest.WPF|[![](https://img.shields.io/nuget/v/dotnetCampus.UITest.WPF.svg)](https://www.nuget.org/packages/dotnetCampus.UITest.WPF)|\n\n# CUnit\n\nDon't you think that naming is very very hard? Especially naming for unit test method? Read this article for more data of naming: [Don’t go into programming if you don’t have a good thesaurus - ITworld](https://www.itworld.com/article/2833265/cloud-computing/don-t-go-into-programming-if-you-don-t-have-a-good-thesaurus.html).\n\nCUnit (MSTestEnhancer) helps you to write unit tests without naming any method.\n\nCUnit is a contract-style unit test extension for MSTestv2. You can write method contract descriptions instead of writing confusing test method name when writing unit tests.\n\n---\n\n## Getting Started with CUnit\n\nYou can write unit test like this:\n\n```csharp\n[TestClass]\npublic class DemoTest\n{\n    [ContractTestCase]\n    public void Foo()\n    {\n        \"When A happened, result A'.\".Test(() =\u003e\n        {\n            // Arrange\n            // Action\n            // Assert\n        });\n\n        \"But when B happened, result B'\".Test(() =\u003e\n        {\n            // Arrange\n            // Action\n            // Assert\n        });\n    }\n}\n```\n\nThen you'll see this kind of test result in testing explorer window:\n\n![Unit test result](/docs/images/unit-test-result-of-demo.png)\n\nFor more usages, please visit:\n\n- [English](/README.md)\n- [日本語](/docs/jp/README.md)\n- [简体中文](/docs/zh-chs/README.md)\n- [繁體中文](/docs/zh-cht/README.md)\n\n### Contributing Guide\n\nThere are many ways to contribute to MSTestEnhancer\n\n- [Submit issues](https://github.com/dotnet-campus/MSTestEnhancer/issues) and help verify fixes as they are checked in.\n- Review the [documentation changes](https://github.com/dotnet-campus/MSTestEnhancer/pulls).\n- [How to Contribute](How%20to%20Contribute.md)\n\n## License\n\nMSTestEnhancer is licensed under the [MIT license](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnet-campus%2Fcunit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotnet-campus%2Fcunit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnet-campus%2Fcunit/lists"}