Support user-defined configurations and profiles in Spring integration test code generation#2351
Merged
IlyaMuravjov merged 8 commits intomainfrom Jul 6, 2023
Merged
Conversation
cca0679 to
c325091
Compare
utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/util/PsiClassUtil.kt
Outdated
Show resolved
Hide resolved
utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/models/BaseTestModel.kt
Outdated
Show resolved
Hide resolved
utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/util/SpringConfigurationsHelper.kt
Show resolved
Hide resolved
utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/generator/UtTestsDialogProcessor.kt
Outdated
Show resolved
Hide resolved
utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/util/PsiClassUtil.kt
Outdated
Show resolved
Hide resolved
IlyaMuravjov
reviewed
Jul 4, 2023
utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/util/SpringConfigurationsHelper.kt
Outdated
Show resolved
Hide resolved
|
|
||
| } | ||
|
|
||
| enum class SpringConfigurationType( |
Collaborator
There was a problem hiding this comment.
Instead of enum I suggest to introduce sealed interface SpringConfig with two implementations and use SpringConfig type to denote Spring configs instead of simply using String. We can choose appropriate implementation of SpringConfig in functions responsible for finding xml and Java configs.
Member
Author
There was a problem hiding this comment.
Discussed in person, it was decided to leave as it is for now.
utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/generator/UtTestsDialogProcessor.kt
Outdated
Show resolved
Hide resolved
utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/util/SpringConfigurationsHelper.kt
Outdated
Show resolved
Hide resolved
c325091 to
37d2982
Compare
IlyaMuravjov
reviewed
Jul 6, 2023
utbot-framework/src/main/kotlin/org/utbot/framework/codegen/generator/SpringCodeGenerator.kt
Outdated
Show resolved
Hide resolved
IlyaMuravjov
reviewed
Jul 6, 2023
.../src/main/kotlin/org/utbot/framework/codegen/tree/CgSpringIntegrationTestClassConstructor.kt
Show resolved
Hide resolved
IlyaMuravjov
reviewed
Jul 6, 2023
utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/GenerateTestsDialogWindow.kt
Outdated
Show resolved
Hide resolved
IlyaMuravjov
reviewed
Jul 6, 2023
utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/generator/UtTestsDialogProcessor.kt
Outdated
Show resolved
Hide resolved
37d2982 to
ca044a3
Compare
ca044a3 to
b91f0d0
Compare
IlyaMuravjov
reviewed
Jul 6, 2023
utbot-spring-commons-api/src/main/kotlin/org/utbot/spring/api/context/ContextWrapper.kt
Outdated
Show resolved
Hide resolved
IlyaMuravjov
reviewed
Jul 6, 2023
utbot-spring-commons/src/main/kotlin/org/utbot/spring/environment/EnvironmentFactory.kt
Outdated
Show resolved
Hide resolved
IlyaMuravjov
approved these changes
Jul 6, 2023
.../src/main/kotlin/org/utbot/framework/codegen/tree/CgSpringIntegrationTestClassConstructor.kt
Show resolved
Hide resolved
utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/Api.kt
Show resolved
Hide resolved
utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/Api.kt
Outdated
Show resolved
Hide resolved
...lin/org/utbot/instrumentation/instrumentation/execution/mock/SpringInstrumentationContext.kt
Outdated
Show resolved
Hide resolved
utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/GenerateTestsDialogWindow.kt
Outdated
Show resolved
Hide resolved
utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/models/GenerateTestsModel.kt
Outdated
Show resolved
Hide resolved
utbot-spring-analyzer/src/main/kotlin/org/utbot/spring/process/SpringAnalyzerProcess.kt
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for user-defined configurations and profiles in Spring integration tests
Also, this PR has fixes for inner class Spring configurations.
Fixes #2292, #2338
How to test
Manual tests
Checking annotations in integration tests:
Checking inner class configuration: