Skip to content

AbstractTestCaseGeneratorTest.kt and SummaryTestCaseGeneratorTest.kt contains duplicated methods #382

Closed
@amandelpie

Description

@amandelpie

This class and its inheritor need to be refactored because they have duplicated methods:

SummaryTestCaseGeneratorTest has

  • List<UtExecution>.checkMatchersWithTextSummary
  • List<UtExecution>.checkMatchersWithMethodNames
  • List<UtExecution>.checkMatchersWithDisplayNames

used for tests in utbot.summary.tests module

and AbstractTestCaseGeneratorTest has

  • List<UtValueExecution<*>>.checkNameMatchers
  • List<UtValueExecution<*>>.checkDisplayNameMatchers
  • List<UtValueExecution<*>>.checkCommentsForBasicErrors
  • List<UtValueExecution<*>>.checkNamesForBasicErrors

used in internalCheck method

It uses some copy-pasted logic which should be refactored to the common methods.

Probably it uses in different places, environments and with different hacks, but checking logic should be common.

Metadata

Metadata

Labels

comp-summariesSomething related to the method names, code comments and display names generationctg-refactoringIssue related to refactoring process

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions