Giter Club home page Giter Club logo

unit-test-java's Introduction

Authentication API

Java Spring Licence

This project is an API built using Java, Java Spring, H2 as the database.

The API was developed for my Youtube Tutorial, to demonstrate how to solve the PicPay Backend Challenge using Java Spring.

The Unit tests was developed during another Youtube Tutorial, with the aim to demonstrate how to write unit tests for Java Spring apps using JUnit, Mockito and AssertJ.

Table of Contents

Installation

  1. Clone the repository:
git clone https://github.com/Fernanda-Kipper/auth-api.git
  1. Install dependencies with Maven

Usage

  1. Start the application with Maven
  2. The API will be accessible at http://localhost:8080

API Endpoints

The API provides the following endpoints:

GET USERS

GET /users - Retrieve a list of all users.
[
    {
        "id": 1,
        "firstName": "Pedro",
        "lastName": "Silva",
        "document": "123456787",
        "email": "[email protected]",
        "password": "senha",
        "balance": 20.00,
        "userType": "MERCHANT"
    },
    {
        "id": 4,
        "firstName": "Luckas",
        "lastName": "Silva",
        "document": "123456783",
        "email": "[email protected]",
        "password": "senha",
        "balance": 0.00,
        "userType": "COMMON"
    }
]

POST USERS

POST /users - Register a new user into the App
{
    "firstName": "Lucas",
    "lastName": "Silva",
    "password": "senha",
    "document": "123456783",
    "email": "[email protected]",
    "userType": "COMMON",
    "balance": 10
}

POST TRANSACTIONS

POST /transactions - Register a new Transaction between users (COMMON to COMMON or COMMON to MERCHANT)
{
  "senderId": 4,
  "receiverId": 1,
  "value": 10
}

Database

The project utilizes H2 Database as the database.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request to the repository.

When contributing to this project, please follow the existing code style, commit conventions, and submit your changes in a separate branch.

unit-test-java's People

Contributors

lucasgabrielgit 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.