A Console app designed to read data from two Json files, run queries on the parsed data, and return records.
A .NET Console application designed to parse two Json files consisting of flight and hotel data, the app accepts a Json 'search' string as an input parameter and runs queries against the flight and hotel data and returns a list of 'best' matching results.
The project structure consists of the following:
- HolidaySearcherApp
- Models
- Services
- HolidaySearcherAppTests
- Data
- ServicesTests
Class Diagram:
The application consists of the following main components:
- FileLoader
- JsonParser
- Data Queryer
- Airport Code Merger
- Holiday Searcher
Query | ReturnType | Description |
---|---|---|
MAN |
ValueTuple<List<Flight>, List<Hotel> int TotalCost> |
Returns best matching results |
Query | ReturnType | Description |
---|---|---|
Any London Airport |
ValueTuple<List<Flight>, List<Hotel> int TotalCost> |
Returns best matching results |
Query | ReturnType | Description |
---|---|---|
Any |
ValueTuple<List<Flight>, List<Hotel> int TotalCost> |
Returns best matching results |
- C# / .NET 6
- NuGet
Fork this repo to your Github and then clone the forked version of this repo.
- Setup:
- Open up project in Visual Studio
- This application requires a path pointing to the data files. By default the path is set using the 'Visual Studio Default Working Directory' and returning its great grand-parent directory (project root folder). This now defaults to: .\HolidaySearcherAppTests\Data
- If your 'Default Working Directory' is not set to application root '\bin\Debug\net6.0', then you will need to specify a new file path:
- To change the filepath in the appliation, you will need to modify the path in the following file:
- Open up a terminal and navigate to the root folder of the main application directory HolidaySearcherApp:
- run:
dotnet restore
- You can run the unit tests in Visual Studio, or you can go to your terminal and inside the root folder of the project HolidaySearcher:
- run:
dotnet test
- The Main Entry Point for the application is: HolidaySearch.cs