• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Talathussain110 / ProductOrderManagement / #27

21 Dec 2025 02:30AM UTC coverage: 94.737% (-5.3%) from 100.0%
#27

push

web-flow
Merge pull request #3 from Talathussain110/integration

REST Integration

12 of 14 new or added lines in 2 files covered. (85.71%)

36 of 38 relevant lines covered (94.74%)

0.95 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.71
/src/main/java/com/example/demo/controller/OrderRestController.java
1
package com.example.demo.controller;
2

3
import java.util.List;
4

5
import org.springframework.beans.factory.annotation.Autowired;
6
import org.springframework.web.bind.annotation.DeleteMapping;
7
import org.springframework.web.bind.annotation.GetMapping;
8
import org.springframework.web.bind.annotation.PathVariable;
9
import org.springframework.web.bind.annotation.PostMapping;
10
import org.springframework.web.bind.annotation.PutMapping;
11
import org.springframework.web.bind.annotation.RequestBody;
12
import org.springframework.web.bind.annotation.RequestMapping;
13
import org.springframework.web.bind.annotation.RestController;
14

15
import com.example.demo.model.Order;
16
import com.example.demo.services.OrderService;
17

18
@RestController
19
@RequestMapping("/api/orders")
20
public class OrderRestController {
1✔
21

22
        @Autowired
23
        private OrderService orderService;
24

25
        @GetMapping
26
        public List<Order> allOrders() {
27
                return orderService.getAllOrders();
1✔
28
        }
29

30
        @GetMapping("/{id}")
31
        public Order order(@PathVariable long id) {
NEW
32
                return orderService.getOrderById(id);
×
33
        }
34

35
        @PostMapping("/new")
36
        public Order newOrder(@RequestBody Order order) {
37
                return orderService.insertNewOrder(order);
1✔
38
        }
39

40
        @PutMapping("/{id}")
41
        public Order updateOrder(@PathVariable long id, @RequestBody Order replacement) {
42
                return orderService.updateOrderById(id, replacement);
1✔
43
        }
44

45
        @DeleteMapping("/{id}")
46
        public void deleteOrder(@PathVariable long id) {
47
                orderService.deleteOrderById(id);
1✔
48
        }
1✔
49
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc