Welcome to the TDD Assignment Abbe repository! This project demonstrates the principles of Test-Driven Development (TDD) with a focus on various functionalities like inventory management, string processing, banking operations, and booking systems.
- Add, remove, and track items in an inventory.
- Check for out-of-stock items.
- Sanitize strings, remove unwanted characters, and perform case conversions.
- Compare strings with various criteria.
- Handle deposits, withdrawals, and balance checks.
- Includes validation for negative or zero transactions.
- Fetch current weather data asynchronously.
- Handle HTTP requests with mock responses.
- Manage bookings with available time slots.
- Includes:
- BookingSystem: Core logic for booking operations.
- BookingSystemFacade: Simplified interface for managing bookings.
- Tests implemented using xUnit and NSubstitute.
- C#: The programming language.
- xUnit: Testing framework.
- NSubstitute: For mocking dependencies in tests.
.
├── Classes
│ ├── BankAccount.cs
│ ├── BookingSystem.cs
│ ├── Calculator.cs
│ ├── InventoryManager.cs
│ ├── ObjectValidator.cs
│ ├── StringProcessor.cs
│ └── WeatherClient.cs
├── Facade
│ ├── BookingSystemFacade.cs
│ └── WeatherClientFacade.cs
├── Interfaces
│ ├── IBookingSystem.cs
│ └── IWeatherClient.cs
├── Test
│ ├── BankAccountTest.cs
│ ├── BookingSystemTest.cs
│ ├── BookingSystemFacadeTest.cs
│ ├── CalculatorTest.cs
│ ├── InventoryManagerTest.cs
│ ├── ObjectValidatorTest.cs
│ ├── StringProcessorTest.cs
│ ├── WeatherClientTest.cs
│ └── WeatherClientFacadeTest.cs
└── TestHelpers
└── MockHttpMessageHandler.cs
- Clone the repository:
git clone https://github.com/OtrevligAbbe/TDD-Assignment-Abbe
- Open the solution in Visual Studio.
- Build the solution to restore dependencies.
- Run all tests using the Test Explorer.
- Tests are written for all major components using xUnit.
- Mocking is done with NSubstitute to isolate dependencies.
- To run tests:
- Open the Test Explorer in Visual Studio.
- Run all tests.
This project is licensed under the MIT License.