{"id":17803419,"url":"https://github.com/mehdihadeli/tdd-sample","last_synced_at":"2026-03-14T20:02:01.223Z","repository":{"id":172802354,"uuid":"649796115","full_name":"mehdihadeli/tdd-sample","owner":"mehdihadeli","description":"A sample project demonstrating Test-Driven Development (TDD) using .Net 8 and Vertical Slice Architecture based on Minimal APIs in .NET Core","archived":false,"fork":false,"pushed_at":"2024-07-27T14:09:58.000Z","size":141,"stargazers_count":12,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-16T11:34:11.579Z","etag":null,"topics":["dotnet","dotnetcore","integration-testing","mocking","nsubstitute","tdd","tdd-kata","test-driven-development","testdrivendevlopment","unit-testing","vertical-slice-architecture"],"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/mehdihadeli.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-06-05T16:48:43.000Z","updated_at":"2025-03-01T10:29:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"be33b8b5-54ad-4d11-b07f-939deaa85d58","html_url":"https://github.com/mehdihadeli/tdd-sample","commit_stats":null,"previous_names":["mehdihadeli/tdd-sample"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehdihadeli%2Ftdd-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehdihadeli%2Ftdd-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehdihadeli%2Ftdd-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehdihadeli%2Ftdd-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mehdihadeli","download_url":"https://codeload.github.com/mehdihadeli/tdd-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244025387,"owners_count":20385578,"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","dotnetcore","integration-testing","mocking","nsubstitute","tdd","tdd-kata","test-driven-development","testdrivendevlopment","unit-testing","vertical-slice-architecture"],"created_at":"2024-10-27T12:46:43.560Z","updated_at":"2026-03-14T20:02:01.148Z","avatar_url":"https://github.com/mehdihadeli.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TDDSample\n\n[![CI](https://img.shields.io/github/actions/workflow/status/mehdihadeli/tdd-sample/ci.yml?label=Build%20Pipeline%20\u0026logo=github\u0026style=for-the-badge)](https://github.com/mehdihadeli/tdd-sample/actions/workflows/ci.yml)\n[![Coverage Status](https://img.shields.io/coverallsCoverage/github/mehdihadeli/tdd-sample?style=for-the-badge\u0026logo=coveralls\u0026label=Code%20Coverage\u0026logoColor=white)](https://coveralls.io/github/mehdihadeli/tdd-sample)\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/mehdihadeli/tdd-sample)\n\nThis repository contains a sample project demonstrating `Test-Driven Development (TDD)` using .Net 8 and `Vertical Slice Architecture` based on `Minimal APIs` in .NET Core. The project aims to showcase best practices for building maintainable and testable software.\n\nBeside of creating some unit tests for achieving test driven development (TDD), we also covered integration and end-to-end testing here.\n\nFeel free to explore the project, learn from the provided examples, and adapt the testing techniques to your own projects. If you have any questions or need further assistance, please don't hesitate to reach out. Happy testing!\n\n## Test driven development (TDD)\n\nTest driven development is a development process in which you write your unit tests before you write your implementation.\n\nThe process looks like this:\n\n- Write a failing unit test. The test should be written in a way that describes what your code should be doing (Red Phase).\n- Write just enough code to make the test pass. At this point it’s best not to worry about the quality of the code, just get a passing test (Green Phase).\n- Refactor your code to improve readability and performance (Refactor Phase).\n\nThis is sometimes referred to as the `Red/Green/Refactor` cycle\n\nYou then repeat this development cycle until the software is complete. One of the main reasons TDD is popular is because it removes the fear of change from projects, this is because the tests are always true and no matter what happens to your code, as long is the business logic is still sound.\n\n## Getting Started \u0026 Prerequisites\n\n1. This application uses `Https` for hosting apis, to setup a valid certificate on your machine, you can create a [Self-Signed Certificate](https://learn.microsoft.com/en-us/aspnet/core/security/docker-https?view=aspnetcore-7.0#macos-or-linux), see more about enforce certificate [here](https://learn.microsoft.com/en-us/aspnet/core/security/enforcing-ssl).\n2. Install git - [https://git-scm.com/downloads](https://git-scm.com/downloads).\n3. Install .NET Core 8.0 - [https://dotnet.microsoft.com/download/dotnet/8.0](https://dotnet.microsoft.com/download/dotnet/8.0).\n4. Install Visual Studio, Rider or VSCode.\n5. Open [tdd-sample.sln](./tdd-sample.sln) solution, make sure that's compiling.\n6. Navigate to `src/TDDSample.Api` and run `dotnet run` to launch the api (ASP.NET Core Web API)\n7. Open web browser https://localhost:5001/swagger Swagger UI\n\n## Contribution\n\nThe application is in development status. You are feel free to submit pull request or create the issue.\n\n## License\n\nThe project is under [MIT license](https://github.com/mehdihadeli/tdd-sample/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehdihadeli%2Ftdd-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmehdihadeli%2Ftdd-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehdihadeli%2Ftdd-sample/lists"}