Conversation
…t-service controllers/services
Integration Test SummaryOverall Results
Integration Test SummaryServices with Integration Tests✅ appointment-booking-service
✅ auth-service
✅ customer-service
✅ progress-monitoring-service
|
Test Coverage SummaryOverall Coverage: 48% Per Service Coverage
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📊 Comprehensive Test Report GeneratedA detailed PDF report combining all test results and coverage metrics has been generated. Available Formats:
Download: Check the workflow artifacts section to download the reports. Workflow Run: #80 |
There was a problem hiding this comment.
💡 Codex Review
This test file now declares a second package block and reintroduces another PaymentServiceTest class starting here even though a class with the same name already ends at line 67. Java requires a single package declaration at the top of the file and only one top-level type with a given name per compilation unit, so javac will fail on this file before any tests can run. The new tests need to be merged into the existing class or moved to a separate file.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -0,0 +1 @@ | |||
| package com.autonova.payments_billing_service.service;import com.autonova.payments_billing_service.config.StripeProperties;import com.autonova.payments_billing_service.domain.*;import com.autonova.payments_billing_service.messaging.DomainEventPublisher;import com.autonova.payments_billing_service.repository.PaymentRepository;import org.junit.jupiter.api.Test;import org.junit.jupiter.api.extension.ExtendWith;import org.mockito.InjectMocks;import org.mockito.Mock;import org.mockito.junit.jupiter.MockitoExtension;import java.util.Optional;import java.util.UUID;import static org.assertj.core.api.Assertions.assertThat;import static org.mockito.Mockito.when;@ExtendWith(MockitoExtension.class)class PaymentServiceProviderLookupTest { @Mock StripeProperties stripeProperties; @Mock PaymentRepository paymentRepository; @Mock DomainEventPublisher eventPublisher; @Mock InvoiceService invoiceService; @InjectMocks PaymentService paymentService; @Test void findLatestSuccessfulPaymentProvider_returnsEmpty_whenNone() { UUID invoiceId = UUID.randomUUID(); when(paymentRepository.findFirstByInvoice_IdAndStatusOrderByCreatedAtDesc(invoiceId, PaymentStatus.SUCCEEDED)) .thenReturn(Optional.empty()); assertThat(paymentService.findLatestSuccessfulPaymentProvider(invoiceId)).isEmpty(); } @Test void findLatestSuccessfulPaymentProvider_returnsProvider_whenPresent() { UUID invoiceId = UUID.randomUUID(); PaymentEntity entity = new PaymentEntity(); entity.setProvider(PaymentProvider.STRIPE); when(paymentRepository.findFirstByInvoice_IdAndStatusOrderByCreatedAtDesc(invoiceId, PaymentStatus.SUCCEEDED)) .thenReturn(Optional.of(entity)); assertThat(paymentService.findLatestSuccessfulPaymentProvider(invoiceId)).contains(PaymentProvider.STRIPE); }} No newline at end of file | |||
There was a problem hiding this comment.
Stub Stripe API key before injecting PaymentService
The new provider lookup test creates PaymentService via @InjectMocks without stubbing stripeProperties.getApiKey(). The PaymentService constructor immediately calls new StripeClient(stripeProperties.getApiKey()) (see PaymentService.java lines 33-44), so with the mock returning null the test will throw during construction rather than exercising findLatestSuccessfulPaymentProvider. Provide a dummy API key in setup (as done in other tests) to allow the service to be instantiated.
Useful? React with 👍 / 👎.
Integration Test SummaryOverall Results
Integration Test SummaryServices with Integration Tests✅ appointment-booking-service
✅ auth-service
✅ customer-service
✅ progress-monitoring-service
|
Test Coverage SummaryOverall Coverage: 47% Per Service Coverage
|
📊 Comprehensive Test Report GeneratedA detailed PDF report combining all test results and coverage metrics has been generated. Available Formats:
Download: Check the workflow artifacts section to download the reports. Workflow Run: #81 |
Integration Test SummaryOverall Results
Integration Test SummaryServices with Integration Tests✅ appointment-booking-service
✅ auth-service
✅ customer-service
✅ progress-monitoring-service
|
Test Coverage SummaryOverall Coverage: 47% Per Service Coverage
|
📊 Comprehensive Test Report GeneratedA detailed PDF report combining all test results and coverage metrics has been generated. Available Formats:
Download: Check the workflow artifacts section to download the reports. Workflow Run: #82 |
Integration Test SummaryOverall Results
Integration Test SummaryServices with Integration Tests✅ appointment-booking-service
✅ auth-service
✅ customer-service
✅ progress-monitoring-service
|
Test Coverage SummaryOverall Coverage: 47% Per Service Coverage
|
📊 Comprehensive Test Report GeneratedA detailed PDF report combining all test results and coverage metrics has been generated. Available Formats:
Download: Check the workflow artifacts section to download the reports. Workflow Run: #83 |
Integration Test SummaryOverall Results
Integration Test SummaryServices with Integration Tests✅ appointment-booking-service
✅ auth-service
✅ customer-service
✅ progress-monitoring-service
|
Test Coverage SummaryOverall Coverage: 47% Per Service Coverage
|
📊 Comprehensive Test Report GeneratedA detailed PDF report combining all test results and coverage metrics has been generated. Available Formats:
Download: Check the workflow artifacts section to download the reports. Workflow Run: #84 |
46c1478 to
d529b27
Compare
Integration Test SummaryOverall Results
Integration Test SummaryServices with Integration Tests✅ appointment-booking-service
✅ auth-service
✅ customer-service
✅ progress-monitoring-service
|
Test Coverage SummaryOverall Coverage: 47% Per Service Coverage
|
Integration Test SummaryOverall Results
Integration Test SummaryServices with Integration Tests✅ appointment-booking-service
✅ auth-service
✅ customer-service
✅ progress-monitoring-service
|
Test Coverage SummaryOverall Coverage: 47% Per Service Coverage
|
📊 Comprehensive Test Report GeneratedA detailed PDF report combining all test results and coverage metrics has been generated. Available Formats:
Download: Check the workflow artifacts section to download the reports. Workflow Run: #85 |
📊 Comprehensive Test Report GeneratedA detailed PDF report combining all test results and coverage metrics has been generated. Available Formats:
Download: Check the workflow artifacts section to download the reports. Workflow Run: #86 |
Integration Test SummaryOverall Results
Integration Test SummaryServices with Integration Tests✅ appointment-booking-service
✅ auth-service
✅ customer-service
✅ progress-monitoring-service
|
Test Coverage SummaryOverall Coverage: 47% Per Service Coverage
|
📊 Comprehensive Test Report GeneratedA detailed PDF report combining all test results and coverage metrics has been generated. Available Formats:
Download: Check the workflow artifacts section to download the reports. Workflow Run: #87 |
Integration Test SummaryOverall Results
Integration Test SummaryServices with Integration Tests✅ appointment-booking-service
✅ auth-service
✅ customer-service
✅ progress-monitoring-service
|
Test Coverage SummaryOverall Coverage: 47% Per Service Coverage
|
📊 Comprehensive Test Report GeneratedA detailed PDF report combining all test results and coverage metrics has been generated. Available Formats:
Download: Check the workflow artifacts section to download the reports. Workflow Run: #88 |
…list files for debug
Integration Test SummaryOverall Results
Integration Test SummaryServices with Integration Tests✅ appointment-booking-service
✅ auth-service
✅ customer-service
✅ progress-monitoring-service
|
Test Coverage SummaryOverall Coverage: 47% Per Service Coverage
|
📊 Comprehensive Test Report GeneratedA detailed PDF report combining all test results and coverage metrics has been generated. Available Formats:
Download: Check the workflow artifacts section to download the reports. Workflow Run: #89 |
Integration Test SummaryOverall Results
Integration Test SummaryServices with Integration Tests✅ appointment-booking-service
✅ auth-service
✅ customer-service
✅ progress-monitoring-service
|
Test Coverage SummaryOverall Coverage: 47% Per Service Coverage
|
📊 Comprehensive Test Report GeneratedA detailed PDF report combining all test results and coverage metrics has been generated. Available Formats:
Download: Check the workflow artifacts section to download the reports. Workflow Run: #90 |
No description provided.