{"id":20646525,"url":"https://github.com/sakapon/klibrary.testing","last_synced_at":"2026-04-24T04:31:25.006Z","repository":{"id":74866691,"uuid":"256369137","full_name":"sakapon/KLibrary.Testing","owner":"sakapon","description":"A library for unit testing using MSTest.","archived":false,"fork":false,"pushed_at":"2020-04-27T13:03:03.000Z","size":85,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-17T09:45:09.845Z","etag":null,"topics":["mstest","testing","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/sakapon.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":"2020-04-17T01:21:24.000Z","updated_at":"2020-04-27T09:04:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"8909602b-d35f-4a2d-8e06-c205f221246d","html_url":"https://github.com/sakapon/KLibrary.Testing","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakapon%2FKLibrary.Testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakapon%2FKLibrary.Testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakapon%2FKLibrary.Testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakapon%2FKLibrary.Testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sakapon","download_url":"https://codeload.github.com/sakapon/KLibrary.Testing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242721296,"owners_count":20174799,"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":["mstest","testing","unit-testing"],"created_at":"2024-11-16T16:26:08.604Z","updated_at":"2025-12-24T04:31:22.954Z","avatar_url":"https://github.com/sakapon.png","language":"C#","readme":"# KLibrary.Testing\n[![license](https://img.shields.io/github/license/sakapon/KLibrary.Testing.svg)](LICENSE)\n[![NuGet](https://img.shields.io/nuget/v/KLibrary.Testing.svg)](https://www.nuget.org/packages/KLibrary.Testing/)\n[![NuGet](https://img.shields.io/nuget/dt/KLibrary.Testing.svg)](https://www.nuget.org/packages/KLibrary.Testing/)\n\nA library for unit testing using MSTest.\n\n## Setup\nKLibrary.Testing is published to [NuGet Gallery](https://www.nuget.org/packages/KLibrary.Testing/). Install the library to test projects by NuGet.\n\n## Features\n- Extends the Assert class\n  - AreNearlyEqual, etc.\n- Creates a test method to be simplified\n  - Wrapping AreEqual or AreNearlyEqual\n- Creates random data\n- Measures execution time\n\n## Usage\nFirstly, add `using` directive for `KLibrary.Testing` namespace.\n```c#\nusing System;\nusing KLibrary.Testing;\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\n```\n\n### AreNearlyEqual Method\nAsserts the specified values are nearly equal, with specifying the upper bound of the absolute error `10^d`.\n```c#\nAssert2.AreNearlyEqual(3.14, Math.PI, -2);\nAssert2.AreNearlyEqual(Math.E, Math.Pow(1.0000001, 10000000), -6);\n```\n\n### Test Method Wrapping\nCreates a function from the function to be tested.\n```c#\n// Before:\nAssert.AreEqual(81, Math.Pow(3, 4));\nAssert.AreEqual(64, Math.Pow(4, 3));\n\n// After:\nvar test = TestHelper.CreateAreEqual\u003cdouble, double, double\u003e(Math.Pow);\ntest(3, 4, 81);\ntest(4, 3, 64);\n```\n\n## Target Frameworks\n- .NET Standard 2.0\n- .NET Framework 4.5\n\n### Dependencies\n- [MSTest.TestFramework](https://www.nuget.org/packages/MSTest.TestFramework/) (≥ 1.3.2)\n\n## Release Notes\n- **v4.0.6** The first release.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsakapon%2Fklibrary.testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsakapon%2Fklibrary.testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsakapon%2Fklibrary.testing/lists"}