Skip to content

INFRA-1533: Add unit tests to Compar somatic variant comparison #722

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

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

DFKoetsier
Copy link
Contributor

Includes some refactoring to make the it easier to test the most relevant parts of the code.

I'm not really happy about the amount of boilerplate in SomaticVariantDataTestFactory, but I couldn't think of a way with less boilerplate without just making all fields in SomaticVariantData mutable. Also, I would prefer to add a test for each field in SomaticVariantData that compare two variants that are only different in that single field, but I couldn't think of a way to do that in a reasonable amount of code.

Suggestions are welcome.

@DFKoetsier DFKoetsier requested a review from mdenburger June 18, 2025 14:18
final List<SomaticVariantData> newVariants, final MatchLevel matchLevel)
{
boolean hasRefItems = refVariants != null;
boolean hasNewItems = newVariants != null;
final List<String> emptyDiffs = Lists.newArrayList();
Copy link
Contributor

Choose a reason for hiding this comment

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

You could replace all "empty list variables" here with List.of(), which returns a reference to a single static empty list.

@DFKoetsier DFKoetsier requested a review from charlesshale June 20, 2025 13:13
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