Skip to content

RiveraHan/OrderManagementTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OrderManagement

Requirements

Structure Services

Example

OrderService
│
├── Controllers
│   └── OrderController.cs
│
├── Domain
│   └── Models
│       └── Order.cs
│
├── Application
│   └── Handlers
│       ├── CreateOrderCommandHandler.cs
│       ├── GetOrderByIdQueryHandler.cs
│       └── GetAllOrdersQueryHandler.cs
│   └── Commands
│       └── CreateOrderCommand.cs
│   └── Queries
│       ├── GetOrderByIdQuery.cs
│       └── GetAllOrdersQuery.cs
│
├── Infrastructure
│   ├── Data
│       └── ApplicationDbContext.cs
│   ├── MessageBus
│       └── RabbitMQMessageBus.cs
│   └── Repositories
│       ├── IOrderRepository.cs
│       └── OrderRepository.cs
│
├── Startup.cs
└── Program.cs

Run docker

cd OrderManagament
docker-compose up --build

Curls Services Test Postman or Insomnia

curl --request POST \
  --url http://localhost:8080/api/User \
  --header 'Content-Type: application/json' \
  --header 'User-Agent: insomnia/9.3.2' \
  --data '{
  "Username": "usertest",
  "Password": "password123",
	"Email": "correo@correo.com"
}'
curl --request GET \
  --url http://localhost:8080/api/User/1 \
  --header 'User-Agent: insomnia/9.3.2'
curl --request POST \
  --url http://localhost:8080/api/User/authenticate \
  --header 'Content-Type: application/json' \
  --header 'User-Agent: insomnia/9.3.2' \
  --data '{
  "Username": "usertest",
  "Password": "password123"
}'
curl --request POST \
  --url http://localhost:8080/api/Order \
  --header 'Content-Type: application/json' \
  --header 'User-Agent: insomnia/9.3.2' \
  --data '{
	"ProductName": "TV",
	"Quantity": 2
}'
curl --request GET \
  --url http://localhost:8080/api/Order \
  --header 'Content-Type: application/json' \
  --header 'User-Agent: insomnia/9.3.2' \
  --data '{
	"ProductName": "TV",
	"Quantity": 2
}'

About

Testing project .NET

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors