Closed haxwell closed 4 months ago
@haxwell The helper method I built is a little unclear and admittedly outdated since we are trying to use testing constants now. Here's what I did:
Long userIdReceiving = userPerPhraseCount + 1L;
ensures that the user ID receiving the cosigns from three other users is never equal to any of the userIssuing IDs. This is based on the user issuing id's being 1, 2, 3 or some sequential numbers of IDs. Now that we are using constants, this should be updated.I could take this ticket and either get rid of the helper method and write out the longer code, or I could rework the helper method with constants and make comments to better explain the logic. What are your thoughts?
Yes, I remember that.. Okay, I think reworking the helper method will be enough.
I refactored the test in pull request #209 , along with the other refactoring of tests to use AbstractTestConstants.
CosignServiceImplTest.java, the method listBuilderCosignForUser()..
Long userIdReceiving = userPerPhraseCount + 1L;
-- Why is the userIdReceiving being based on a count? Just set it to something, don't base it on this variable. Someone coming behind (like me) looking at this won't understand why it's being done.