Skip to content

bubus128/TrainTicketMachine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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": []
}

About

API for searching railway stations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published