Skip to content

DVentas/piTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Pi Test

Build Status Coverage Status

How to use

  1. System requirements

  • Java 8
  • Maven 3
  1. Setup your verticle.cfg (or use this one as a default)


{
    "server": {
        "host": "localhost",
        "port": 8080,
        "base_path": "/",
        "resources": ["org.daniel.ventas"]
    },
    "key.stringArray" : "stringsToProcess"
}

  1. Compile project

  mvn package
  1. Deploy server

  java -jar target/interview-1.0-SNAPSHOT-fat.jar --conf src/main/resources/verticle.cfg
  1. Test API

Example 1

  curl -H "Content-Type: application/json" -X POST -d '{"stringsToProcess":["stringtotest", "otherstringrandom"]}' http://localhost:8080/api/mix

Should return:

  {
    "result" : "1:tttt/2:rrr/2:nn/2:oo/1:ss"
  }

Example 2

  curl -H "Content-Type: application/json" -X POST -d '{"stringsToProcess":["firstelementiiiiiillllll", "2 12213(( ^ seeeecondAYI32  ++ - element", "third&elementoooooo"]}' http://localhost:8080/api/mix

Should return:

  {
    "result" : "2:eeeeeee/1:iiiiiii/1:lllllll/3:oooooo/2:nn/1,3:tt"
  }

Releases

No releases published

Packages

No packages published

Languages