{"id":20490104,"url":"https://github.com/dirkchristianbecker/simpleunittests","last_synced_at":"2026-05-17T15:09:20.465Z","repository":{"id":205640908,"uuid":"714720832","full_name":"DirkChristianBecker/simpleunittests","owner":"DirkChristianBecker","description":"Simple Unit tests for Godot.net","archived":false,"fork":false,"pushed_at":"2024-07-29T06:37:50.000Z","size":204,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-28T12:31:45.444Z","etag":null,"topics":["csharp","game-development","godot","mit-license","open-source","unit-testing"],"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/DirkChristianBecker.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-05T17:21:56.000Z","updated_at":"2024-07-29T06:37:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"6ec700d5-22e6-4015-9350-02f53d3de280","html_url":"https://github.com/DirkChristianBecker/simpleunittests","commit_stats":null,"previous_names":["dirkchristianbecker/simpleunittests"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DirkChristianBecker/simpleunittests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirkChristianBecker%2Fsimpleunittests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirkChristianBecker%2Fsimpleunittests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirkChristianBecker%2Fsimpleunittests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirkChristianBecker%2Fsimpleunittests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DirkChristianBecker","download_url":"https://codeload.github.com/DirkChristianBecker/simpleunittests/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirkChristianBecker%2Fsimpleunittests/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33143276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["csharp","game-development","godot","mit-license","open-source","unit-testing"],"created_at":"2024-11-15T17:15:34.376Z","updated_at":"2026-05-17T15:09:20.451Z","avatar_url":"https://github.com/DirkChristianBecker.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Unit Tests for Godot.net\nImplements unit tests for Godot.net. The project is kept very simple and small to encourage users to modify it to meet their needs.\n\n# Installation\nCreate a new project and inside this project create a folder called 'addons'. Now clone this repository into the addons folder, then \nunder 'Project -\u003e Tools -\u003e C#' click 'Create C# Solution'.\n\n![Project settings](images/CreateSolution.png)\n\nNow you should have a 'Build'-Button in the upper right corner of the editor window. Click it in order to build the cloned plugin. \n\n![Project settings](images/Build.png)\n\nNow we activate the plugin. Go to 'Project -\u003e Project settings -\u003e Plugins' and mark the plugin. \n\n![Project settings](images/ProjectSettings.png)\n\n![Project settings](images/Plugins.png)\n\nAfter that the testrunner window should show up.\n\n![Project settings](images/TestRunner.png)\n\nYou can dock it anywhere in your project like any other editor window. If you click on 'Run' at this stage you should see the results from\nthe examples.\n\n![Project settings](images/FirstRun.png)\n\n\n# Writing tests\nTo implement your own tests derrive from TestSuite and mark each method that is a test with the TestCase-Attribute. \nThe TestSuite implements some methods that you can use to write your tests (AssertEqual, AssertNotEqual and AssertException). \nHere is an example of how to write tests: \n\n```\nusing SimpleUnitTests;\n\nnamespace Tests\n{\n    public class TestTemplate : TestSuite\n    {\n        public TestTemplate() : base(\"Test template\")\n        {\n        }\n\n        [TestCase]\n        public void TestInteger()\n        {\n            AssertEqual(1, 1);\n            AssertNotEqual(1, 2);\n        }\n\n        // A disabled test case\n        [TestCase(false)]\n        public void DeactivatedTest()\n        {\n            AssertEqual(true, true);\n            AssertNotEqual(true, false);\n        }\n\n        private void TestHelper(object o)\n        {\n            if(o == null)\n            {\n                throw new ArgumentNullException(nameof(o));\n            }\n        }\n\n        [TestCase()]\n        public void ExceptionTest()\n        {\n            AssertException\u003cArgumentNullException\u003e(() =\u003e\n            {\n                TestHelper(null);\n            });\n        }\n    }\n}\n```\n\n# Run\nOnce your tests are written, click build in the upper right of the Godot Editor and than Run inside the test runner window. \n\nThe test runner will look for all TestSuites in the currently running assembly and run all tests cases it can find. The results will be shown\ninside the test runner window. If a test fails you might not be able to read the entire error message. But you can hover with your mouse over\nthe error message and Godot will show the message as a tooltip. \n\nThe project contains a file named TestTemplate.cs. This serves as an example on how to write test cases and is itself\na TestSuite to test the unit tests itself. These tests will also be found by the test runner when it looks for tests suites. This is on purpose\nto aid the development of this plugin. However if you don´t want these tests to run you can either delete the template file or deactivate \nthe test cases by giving a false to the attribute constructor. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirkchristianbecker%2Fsimpleunittests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdirkchristianbecker%2Fsimpleunittests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirkchristianbecker%2Fsimpleunittests/lists"}