xp-forge / lambda-ws

AWS Lambda Webservices for the XP Framework
1 stars 0 forks source link

Increase test coverage #3

Closed thekid closed 3 years ago

thekid commented 3 years ago

The HttpApi class is missing unittests completely, the FromApiGateway class doesn't have coverage for its readLine() method.

$ xp coverage -p src/main/php/ src/test/php/
# ...
Tests:       21 passed
Memory used: 11655.24 kB (11713.48 kB peak)
Time taken:  0.016 seconds
Coverage:    62.90% lines covered (39/62)

┌──────────────────────────────────────────────────────┬─────────┬──────┐
│ Class                                                │ % Lines │  Not │
╞══════════════════════════════════════════════════════╪═════════╪══════╡
│ com.amazon.aws.lambda.FromApiGateway                 │  75.00% │    8 │
│ com.amazon.aws.lambda.HttpApi                        │   0.00% │   15 │
│ com.amazon.aws.lambda.ResponseDocument               │ 100.00% │      │
└──────────────────────────────────────────────────────┴─────────┴──────┘
thekid commented 3 years ago

FromApiGateway coverage increased to 100% with xp-forge/lambda-ws@741d5a7de9ca1796f8b655c52641e3674becafd4

thekid commented 3 years ago

HttpApi tests introduced in xp-forge/lambda-ws@a62bf976cb2bca6ab81251185e0d6ae202dacd7e

thekid commented 3 years ago
Tests:       31 passed
Memory used: 12285.20 kB (12343.44 kB peak)
Time taken:  0.079 seconds
Coverage:    100.00% lines covered (77/77) > coverage/index.html