{"id":16485370,"url":"https://github.com/zaid-ajaj/tinytest","last_synced_at":"2026-06-04T21:31:26.624Z","repository":{"id":87583394,"uuid":"105768101","full_name":"Zaid-Ajaj/TinyTest","owner":"Zaid-Ajaj","description":"Tiny single file test \"framework\" for small projects ","archived":false,"fork":false,"pushed_at":"2018-03-22T11:26:46.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-11T14:46:03.895Z","etag":null,"topics":["csharp","tdd","testing"],"latest_commit_sha":null,"homepage":null,"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/Zaid-Ajaj.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":"2017-10-04T12:53:20.000Z","updated_at":"2018-03-22T11:26:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"f70fa8b5-0711-47fc-87bc-3feef7e0e25a","html_url":"https://github.com/Zaid-Ajaj/TinyTest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zaid-Ajaj%2FTinyTest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zaid-Ajaj%2FTinyTest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zaid-Ajaj%2FTinyTest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zaid-Ajaj%2FTinyTest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zaid-Ajaj","download_url":"https://codeload.github.com/Zaid-Ajaj/TinyTest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241261929,"owners_count":19936046,"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":["csharp","tdd","testing"],"created_at":"2024-10-11T13:25:38.232Z","updated_at":"2025-11-24T05:01:59.106Z","avatar_url":"https://github.com/Zaid-Ajaj.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TinyTest\nTiny single file test \"framework\" for small projects because you don't always need full fledged testing frameworks.\n\n## Usage\n - Create a console project (the test runner)\n - Copy the file [TinyTest.cs](https://github.com/Zaid-Ajaj/TinyTest/blob/master/TinyTest.cs) to the project\n - Start writing tests\n \n ```csharp\nusing TinyTest;\n\nclass Program\n{\n    static int Add(int x, int y) =\u003e x + y;\n\n    static int Main(string[] args)\n    {\n        Test.Module(\"Simple Tests\");\n\n        Test.Case(\"Add(x, y) works\", () =\u003e\n        {\n            var result = Enumerable.Range(1, 100).Aggregate(Add);\n            Test.Equal(result, 5050);\n        });\n\n        Test.CaseAsync(\"Async tests too!\", async () =\u003e\n        {\n            await Task.Delay(200);\n            Test.Equal(1, 1);\n        });\n\n        return Test.Report();\n    }\n}\n```\nTest Results:\n\n![ScreenShot](screenshot.png)\n\n\n## Grouping tests\nYou can group tests using modules:\n```csharp\nTest.Module(\"Math tests\");\nTest.Case(\"Case 1\", () =\u003e ... );\nTest.Case(\"Case 2\", () =\u003e ... );\n\nTest.Module(\"Database tests\");\nTest.Case(\"Case 1\", () =\u003e ... );\nTest.Case(\"Case 2\", () =\u003e ... );\n\nTest.Report();\n``` \n## Test reporters\n\nYou can implement your own test reporters easily. The call `Test.Report()` only calls `Test.ReportUsing(new ConsoleReporter())` where `ConsoleReporter` is an `ITestReporter`. i.e.:\n```csharp\npublic interface ITestReporter\n{\n    void Report(IEnumerable\u003cTestModule\u003e modules); \n}\n\npublic class ConsoleReporter : ITestReporter\n{\n    /* ... */\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaid-ajaj%2Ftinytest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaid-ajaj%2Ftinytest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaid-ajaj%2Ftinytest/lists"}