TinyURL is a straightforward URL shortening service developed using .NET 8 and adhering to principles of Clean Architecture, Domain Driven Design (DDD), and Test Driven Development (TDD). This project enables users to create shortened URLs, retrieve original URLs, delete shortened URLs, and monitor usage statistics.
- .NET 8
- Visual Studio 2022 (Optional)
-
Open the Solution File:
- Open the solution file
TinyURL.sln
in Visual Studio 2022.
- Open the solution file
-
Set the Startup Project:
- In the Solution Explorer, right-click on the
TinyURL.Presentation
project and selectSet as Startup Project
.
- In the Solution Explorer, right-click on the
-
Run the Project:
- Press
F5
or click theRun
button to start the application.
- Press
- Open the CLI
- Go to directory:
...\TinyURL\src\TinyURL.Presentation
- Run command:
dotnet run
The unit tests for this project are located in the TinyURL\tests\TinyURL.Presentation.UnitTests
directory. Follow the steps below to run these tests using Visual Studio 2022:
- Open the solution file
TinyURL.sln
in Visual Studio 2022.
- Go to
Test > Test Explorer
from the menu to open the Test Explorer window.
- In the Test Explorer, you should see a list of all the tests available in the solution, including those under
TinyURL.Presentation.UnitTests
. - To run all the tests, click the
Run All
button at the top of the Test Explorer window. - Alternatively, you can run specific tests by selecting them and clicking
Run Selected Tests
.
- TinyURL.Presentation: The console application that provides the CLI interface for interacting with the URL shortening service.
- TinyURL.Application: Contains the use cases of the application.
- TinyURL.Domain: Contains the core logic and business rules of the application.
- TinyURL.Infrastructure: Provides implementations for data storage and other infrastructure-related concerns.