gchq / Gaffer

A large-scale entity and relation database supporting aggregation of properties
Apache License 2.0
1.77k stars 350 forks source link

Refactor NamedOperationCacheIT #3171

Closed GCHQDeveloper314 closed 6 months ago

GCHQDeveloper314 commented 6 months ago

Describe the new feature you'd like Refactor of NamedOperationCacheIT.java to use JUnit correctly.

Why do you want this feature? This class has a single @Test method which then proceeds to run multiple tests by manually calling methods. Instead, these should all be annotated as individual tests for JUnit to run itself. There are also some methods annotated as before and after which are simply run manually.

Use of com.google.common.collect.Lists should also be removed as it is unnecessary.

nine03 commented 6 months ago

Hi, i want to work on this issue. Could you assign this issue?

GCHQDeveloper314 commented 6 months ago

We usually assign the issue after a PR has been opened against it. We always ensure the contributor is assigned to the issue before it is closed - this ensures the contribution is recorded in our release notes.

GCHQDeveloper314 commented 6 months ago

There are some details on our ways of working page. However as you are an external contributor, I don't believe it matters so much as the automation to link PR to issue may not pick up the branch anyway as it will be in your fork. We will link it manually before merging.

nine03 commented 6 months ago

@GCHQDeveloper314

com.google.common.collect.Lists requirement says I should delete this. There are many places that use Lists. Are you suggesting that I import and use org.assertj.core.util?

GCHQDeveloper314 commented 6 months ago

That is an option, although Arrays.asList() is preferable to using AssertJ as it has been used elsewhere in the codebase.

nine03 commented 6 months ago

I have resolved this issue and have created a pull request. Could you kindly review and address it when you have the chance?