Giter Club home page Giter Club logo

tinnova-test's Introduction

API REST TINNOVA 1

processo seletivo

Como executar

Tudo que será necessário para executar o projeto será java 8 instalado na maquina. Para executar basta baixar o JAR que está junto com o projeto (na pasta executavel) ou realizar o build do mesmo com mvn clean install.

para executar basta utilizar o seguinte comando:

java -jar tinnova-test-cars-0.0.1-SNAPSHOT.jar

O teste poderá ser realizado diretamente pelo swagger através do endereço: http://localhost:8080//tinnova/swagger-ui.html# ou via curl como nos exemplos abaixo:

##Bubble Sort:

Requisição:

curl -X GET "http://localhost:8080/tinnova/api/v1/bubbleSort/solve?values=5&values=3&values=2&values=4&values=6&values=1&values=0&values=6" -H "accept: application/json"

Retorno esperado:

{
  "OrderedVector": [
    0,
    1,
    2,
    3,
    4,
    5,
    6,
    6
  ]
}

##Fatorial:

Requisição:

curl -X GET "http://localhost:8080/tinnova/api/v1/factorial/solve?value=10" -H "accept: application/json"

Retorno esperado:

{
  "Factorial": 3628800
}

##Soma de multiplos:

Requisição:

curl -X GET "http://localhost:8080/tinnova/api/v1/division/solve?value=10" -H "accept: application/json"

Retorno esperado:

{
  "DivisionResult": 23
}

##Eleição:

Requisição

curl -X GET "http://localhost:8080/tinnova/api/v1/voting/solve?blankVotes=10&nullVotes=10&totalVotes=500&validVotes=480" -H "accept: application/json"

Retorno esperado:

{
  "valid_votes_percent": 96,
  "blank_votes_percent": 2,
  "null_votes_percent": 2
}

tinnova-test's People

Contributors

flaviodias97 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.