Skip to content

(ref/test): refactor test cases - #38

Merged
ShantanuKumarSinha merged 4 commits into
mainfrom
ref/test
Aug 23, 2025
Merged

(ref/test): refactor test cases#38
ShantanuKumarSinha merged 4 commits into
mainfrom
ref/test

Conversation

@ShantanuKumarSinha

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors test cases by removing unused imports, commenting out mail configuration, enabling previously disabled tests, and adding a new logging interceptor.

  • Cleaned up test imports and configurations to remove unnecessary dependencies
  • Enabled a previously disabled integration test for product creation
  • Added a new LoggerInterceptor for request/response logging with proper Spring MVC configuration

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
TestConfig.java Commented out mail sender bean configuration for test environment
ProductServiceTest.java Removed unused imports including ObjectMapper, UserServiceImpl, and WebClient
McProductServiceApplicationTests.java Enabled disabled test, added MockMvc configuration, and activated test profile
EmailServiceTest.java Reordered imports and updated commented assertion
UserServiceImpl.java Refactored static fields to instance variables with PostConstruct initialization
LoggerInterceptor.java Added new interceptor class for logging HTTP requests and responses
McProductServiceApplication.java Added interceptor configuration and reorganized field declarations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/main/java/dev/shann/mcproductservice/interceptors/LoggerInterceptor.java Outdated
Comment thread src/main/java/dev/shann/mcproductservice/interceptors/LoggerInterceptor.java Outdated
ShantanuKumarSinha and others added 3 commits August 23, 2025 13:33
…terceptor.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ShantanuKumarSinha
ShantanuKumarSinha merged commit 834be9b into main Aug 23, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants