-
Notifications
You must be signed in to change notification settings - Fork 662
dataconnect: testing: internal refactor of chain of "ifs" to a "when" expression #7629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dataconnect: testing: internal refactor of chain of "ifs" to a "when" expression #7629
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. |
📝 PRs merging into main branchOur main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released. |
Coverage Report 1Affected ProductsNo changes between base commit (6dab936) and merge commit (21930bf).Test Logs |
|
/gemini review |
|
/gemini summary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request is a nice, small refactoring that improves code quality. It replaces a chain of if-else if expressions with a more idiomatic Kotlin when expression within a test file. This change, suggested by Android Studio, enhances readability without altering any logic. I have one minor suggestion to make the code even more concise.
...src/test/kotlin/com/google/firebase/dataconnect/testutil/property/arbitrary/protoUnitTest.kt
Outdated
Show resolved
Hide resolved
Summary of ChangesThis pull request focuses on improving code readability and maintainability within the Data Connect unit testing suite. It replaces a multi-conditional Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
|
This PR slightly improves code readability and maintainability within the Data Connect unit testing suite by replacing a multi-conditional
if-else ifstructure with a Kotlinwhenexpression. No functional changes were made by this PR.Highlights
if-else ifstatements into a more concise and readablewhenexpression within theValue.hasNestedKindextension function.Changelog
if-else ifchain to awhenexpression in theValue.hasNestedKindfunction for improved readability.