Skip to content

Refactor to reduce coupling of base UtBot implementation with Spring-specific features - #2411

Merged
IlyaMuravjov merged 20 commits into
mainfrom
ilya_m/refactor_spring_app_context
Jul 20, 2023
Merged

Refactor to reduce coupling of base UtBot implementation with Spring-specific features#2411
IlyaMuravjov merged 20 commits into
mainfrom
ilya_m/refactor_spring_app_context

Conversation

@IlyaMuravjov

@IlyaMuravjov IlyaMuravjov commented Jul 13, 2023

Copy link
Copy Markdown
Collaborator

Description

Fixes #2358, #2226

How to test

Regression tests (this pull request should not change UtBot semantics at all)

Self-check list

  • I've set the proper labels for my PR (at least, for category and component).
  • PR title and description are clear and intelligible.
  • I've added enough comments to my code, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date.

@IlyaMuravjov IlyaMuravjov added ctg-refactoring Issue related to refactoring process comp-spring Issue is related to Spring projects support labels Jul 13, 2023
@IlyaMuravjov
IlyaMuravjov force-pushed the ilya_m/refactor_spring_app_context branch from a7aaf80 to 6569628 Compare July 17, 2023 10:11
@IlyaMuravjov IlyaMuravjov changed the title Split ApplicationContext into multiple interfaces Refactor to reduce coupling of base UtBot implementation with Spring-specific features Jul 17, 2023
@IlyaMuravjov
IlyaMuravjov force-pushed the ilya_m/refactor_spring_app_context branch 2 times, most recently from 19cb36d to 2874151 Compare July 18, 2023 12:50
@IlyaMuravjov
IlyaMuravjov marked this pull request as ready for review July 18, 2023 15:25

@Damtev Damtev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

}
}

class SimpleUtExecutionInstrumentation(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's extract it to a separate file

classfileBuffer: ByteArray
) = null

class Factory : Instrumentation.Factory<Result<*>, InvokeInstrumentation> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not object?

}
}

class Factory : Instrumentation.Factory<Trace, ExecutionTraceInstrumentation> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not object?

return instrumenter.classByteCode
}

class Factory : Instrumentation.Factory<Result<*>, CoverageInstrumentation> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not object?

}
}

class Factory : Instrumentation.Factory<Result<*>, InvokeWithStaticsInstrumentation> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not object?

@IlyaMuravjov
IlyaMuravjov force-pushed the ilya_m/refactor_spring_app_context branch from 396a4fb to 186a0fb Compare July 19, 2023 14:53
@IlyaMuravjov
IlyaMuravjov force-pushed the ilya_m/refactor_spring_app_context branch from f9a6a20 to dbf4da7 Compare July 20, 2023 08:59
@IlyaMuravjov
IlyaMuravjov merged commit eab0b84 into main Jul 20, 2023
@IlyaMuravjov
IlyaMuravjov deleted the ilya_m/refactor_spring_app_context branch July 20, 2023 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-spring Issue is related to Spring projects support ctg-refactoring Issue related to refactoring process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid whens by applicationContext by introducing UTBotComponentFactory

4 participants