GitXplorerGitXplorer
j

MarketBasket

public
1 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
7ad08a416a234ba3b088d52ecdcdd5e9e327d0e7

Update Readme with How to test

jjoaoluizn committed 4 years ago
Unverified
080be8ed4e40a7e6b37625b162109c09617a77fa

Move DTOs to DTO folder

jjoaoluizn committed 4 years ago
Verified
9744b4031e32b0c6dc26813cd514ea6596614c46

Merge pull request #3 from joaoluizn/order-checkout

jjoaoluizn committed 4 years ago
Unverified
13c768248cc77eb3f04657670914901142ef7def

Add basket checkout logic

jjoaoluizn committed 4 years ago
Verified
7f610938b4d958ce9292f32ff30b5e5effe087c2

Merge pull request #2 from joaoluizn/multiple-items

jjoaoluizn committed 4 years ago
Unverified
1d2bf53ec8296bfdd39a2df8cb15eb062368bd3b

Multiple-items review#1

jjoaoluizn committed 4 years ago

README

The README file for this repository.

MarketBasket

A Java Market Basket Implementation with Taxes calculation.

Architecture

The following Architecture was thinking on acess logic through Business layer, were the Checkout.java is the Business Object, that acess components needed in order to achieve the Checkout.

These data would be passed to a superior layer that could be a Controller, or in that case, the Application.java itself.

Models contain entities that could be schema for database objects.

DTO represents the data transfer objects that are being used for intermediate data transfer operations between components.

Utils contains all utilitary classes that could be used along te project.

Tests folder follows the same architecture to unit test business logic.

📦src
 ┣ 📂main
 ┃ ┣ 📂java
 ┃ ┃ ┣ 📂core
 ┃ ┃ ┃ ┣ 📂business
 ┃ ┃ ┃ ┃ ┣ 📂checkout
 ┃ ┃ ┃ ┃ ┃ ┗ 📜TaxesCalculator.java
 ┃ ┃ ┃ ┃ ┗ 📜Checkout.java
 ┃ ┃ ┃ ┣ 📂dto
 ┃ ┃ ┃ ┃ ┣ 📜BuyOrder.java
 ┃ ┃ ┃ ┃ ┣ 📜Receipt.java
 ┃ ┃ ┃ ┃ ┣ 📜TaxedOrder.java
 ┃ ┃ ┃ ┃ ┗ 📜TaxedProduct.java
 ┃ ┃ ┃ ┣ 📂models
 ┃ ┃ ┃ ┃ ┣ 📂enums
 ┃ ┃ ┃ ┃ ┃ ┗ 📜ProductType.java
 ┃ ┃ ┃ ┃ ┗ 📜Product.java
 ┃ ┃ ┃ ┗ 📜Application.java
 ┃ ┃ ┗ 📂utils
 ┃ ┃ ┃ ┗ 📜MathUtils.java
 ┃ ┗ 📂resources
 ┗ 📂test
 ┃ ┣ 📂java
 ┃ ┃ ┣ 📂core
 ┃ ┃ ┃ ┗ 📂business
 ┃ ┃ ┃ ┃ ┣ 📂checkout
 ┃ ┃ ┃ ┃ ┃ ┗ 📜TaxesCalculatorTest.java
 ┃ ┃ ┃ ┃ ┗ 📜CheckoutTest.java
 ┃ ┃ ┗ 📂TestUtils
 ┃ ┃ ┃ ┗ 📜TestUtils.java
 ┃ ┗ 📂resources

How to Run

  • Run the Application.java main method.

How to Test

  • Run the following command on terminal: ./gradlew test
  • Or run through the IDE