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

Talathussain110 / ProductOrderManagement / #15

16 Dec 2025 10:06PM UTC coverage: 46.739% (-22.6%) from 69.355%
#15

push

Talathussain110
Added fake in-memory service implementation for manual web page testing

0 of 39 new or added lines in 2 files covered. (0.0%)

3 existing lines in 2 files now uncovered.

43 of 92 relevant lines covered (46.74%)

0.47 hits per line

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

0.0
/src/main/java/com/example/demo/services/ProductService.java
1
package com.example.demo.services;
2

3
import java.util.ArrayList;
4
import java.util.LinkedHashMap;
5
import java.util.List;
6
import java.util.Map;
7

8
import org.springframework.stereotype.Service;
9

10
import com.example.demo.model.Product;
11

12
@Service
13
public class ProductService {
14

NEW
15
        private final Map<Long, Product> products = new LinkedHashMap<>();
×
16

NEW
17
        public ProductService() {
×
NEW
18
                products.put(1L, new Product(1L, "Laptop", 1500.00));
×
NEW
19
                products.put(2L, new Product(2L, "Mouse", 25.50));
×
UNCOV
20
        }
×
21

22
        public List<Product> getAllProducts() {
NEW
23
                return new ArrayList<>(products.values());
×
24
        }
25
        
26
        public Product getProductById(long id) {
NEW
27
                return products.get(id);
×
28
        }
29

30
        public Product insertNewProduct(Product product) {
NEW
31
                long newId = products.size() + 1L;
×
NEW
32
                product.setId(newId);
×
NEW
33
                products.put(newId, product);
×
NEW
34
                return product;
×
35
        }
36

37
        public Product updateProductById(long id, Product replacement) {
NEW
38
                replacement.setId(id);
×
NEW
39
                products.put(id, replacement);
×
NEW
40
                return replacement;
×
41
        }
42

43
        public void deleteProductById(long id) {
NEW
44
                products.remove(id);
×
UNCOV
45
        }
×
46
}
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