Skip to content

Latest commit

 

History

History
104 lines (71 loc) · 4.61 KB

README.md

File metadata and controls

104 lines (71 loc) · 4.61 KB

✈️ Holiday Search 🏖️

A Console app designed to read data from two Json files, run queries on the parsed data, and return records.

🔗 Table of contents

  1. Introduction
  2. Application Overview
    1. Technologies Used
    2. Query References
  3. Pre-Requisites
  4. Getting Started
    1. Application Setup
    2. Restore Dependencies
    3. Running Tests
    4. Main Entry Point

Introduction 👋

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

💻 Application Overview

Class Diagram:

The application consists of the following main components:

  • FileLoader
  • JsonParser
  • Data Queryer
  • Airport Code Merger
  • Holiday Searcher

⚒️ Technologies Used

C# .NET 6


❓ Query References

Get Best Matching results when user wants to depart from a specific airport

Query ReturnType Description
MAN ValueTuple<List<Flight>, List<Hotel> int TotalCost> Returns best matching results

Get Best Matching results when user wants to depart from any airport in a given city

Query ReturnType Description
Any London Airport ValueTuple<List<Flight>, List<Hotel> int TotalCost> Returns best matching results

Get Best Matching results when user wants to depart from any airport

Query ReturnType Description
Any ValueTuple<List<Flight>, List<Hotel> int TotalCost> Returns best matching results

⭐ Pre-requisites

  • C# / .NET 6
  • NuGet

🔀 Getting Started

Application Setup

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:

Restore Dependencies

  • Open up a terminal and navigate to the root folder of the main application directory HolidaySearcherApp:
  • run: dotnet restore

Running the Unit Tests

  • 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

Main Entry Point

Thank you!! 👋