Skip to content

Latest commit

 

History

History
90 lines (80 loc) · 3.08 KB

File metadata and controls

90 lines (80 loc) · 3.08 KB

LinkedIn

Test Results

Test Statuses

Unit Tests
Integration Tests

TrainTicketMachine

Description

Solution to the Train Ticket Machine task. Application can be run using Docker. Folder src/TrainTicketMachineGui contains a graphical user interface (WPF app). GUI was created for a university project, not as part of a recruitment task. This part was made as a "quick and dirty solution", but it works 😆.

How to use

  1. Clone
  2. Run docker-compose up
  3. Send get request with "prefix" parameter eg.: localhost:80/Stations?prefix=Ad
  4. Response:
 {
  "stationsNames": [
      "Adderley Park",
      "Addiewell",
      "Addlestone",
      "Adisham",
      "Adlington (Cheshire)",
      "Adlington (Lancs)",
      "Adwick"
  ],
  "nextLetters": [
      "d",
      "i",
      "l",
      "w"
  ]
}
  1. Url with station data source is sotred in appsettings.json in section InfrastructureConfig:StationsApiUrl

Quick postman tests results

  1. localhost:80/Stations?prefix=Ad
  {
   "stationsNames": [
       "Adderley Park",
       "Addiewell",
       "Addlestone",
       "Adisham",
       "Adlington (Cheshire)",
       "Adlington (Lancs)",
       "Adwick"
   ],
   "nextLetters": [
       "d",
       "i",
       "l",
       "w"
   ]
 }
  1. localhost:80/Stations?prefix=Adderley
{
    "stationsNames": [
        "Adderley Park"
    ],
    "nextLetters": [
        " "
    ]
}
  1. localhost:80/Stations?prefix=NotAStation
{
    "stationsNames": [],
    "nextLetters": []
}