Giter VIP home page Giter VIP logo

firm-user-registration's Introduction

CodingExerciseByAdnan

Coding Exercise

This is a Spring Boot application to make sure our main application is being accessed by humans and not a by any computers or bot.

Specifications . Used Spring Boot . used Gradle for build and dependency management . Attempted at Test class using Spring Boot but was getting build errors in resolving org.hamcrest package, so I put that on the side for now.

Description: When GET: http://localhost:8080/ request is made, this application generates a question with random operands challenging the user to submit the answer of the sum. The maximum operands in the sum can be 4, and minimum 2.

When POST: http://localhost:8080/ request is made, this application accepts the question, and the suggested answer by the user, and compares the results of summation from question with submitted answer, and responds whether the answer for right or wrong.

Instructions to download deploy and tets

  1. Clone this project in a local workspace
  2. In the project directory, run : gradle build

(Ensure all dependencies are resolved and there are no build errors due to unresolved dependencies)

  1. Now run the java class file Application.class file located in /CodingExcerciseByAdnan/src/main/java/com/coding/exercise/Application. This can be run either from the command line or from IDE.

  2. Now use Postman or any REST API Test tool, and make following request: GET: http://localhost:8080/

    Expected Result: Something like this: Please sum the numbers 6,1,9,1

  3. Now make another REST call to thi POST: http://localhost:8080/ Request body: { "questionText" : "Please sum the numbers 6,1,9,1", "suggestedResult" : 17 }

Request Header: Content-type: application/json

EXPECTED RESULT: Either HttpStatus of 200 for HttpStatus.OK or HttpStatus of 400 for HttpStatus.BadRequest

firm-user-registration's People

Contributors

adsid avatar

Watchers

 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.