Resolve WES-127-Refactor_Themelist #69
Reference in New Issue
Block a user
Delete Branch "WES-127-Refactor-ThemeList"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Testing Instructions
Please provide instructions on how the code reviewers can test your changes:
Related Issues
WES-131 : The modelList brings the model closer to the signpredictor, which is handy for the SignPredictor-refactor
Checklist
Closes WES-127
requested review from @louadria, @tihabils, @dvschuyl, @lvrossem, @hvbreuge, @jeldgees, and @jrcoudro
added 1 commit
be745723- Added test-code and moved scripts to correct foldersCompare with previous version
marked this merge request as ready
changed title from {-Draft: -}Resolve WES-127-R{-E-}factor_Themelist to Resolve WES-127-R{+e+}factor_Themelist
changed the description
approved this merge request
Shouldn't you use the GetModelbyIndex function here?
why not:
modelList.GetModelByIndex(...)...
It doesn't really matter, but you make a getter:

And then don't use it. Right now, it's only being used in your unit tests.
Thats fair, I just kinda fogot them for some reason. Ill change it
Okay, I get why I didn't use this function now, it uses a different index. This is because I reused logic from MinigameList. The getModelByINdex serves no purpose here though, so I will change it
changed this line in version 3 of the diff
resolved all threads
added 1 commit
dfdb2ab1- Updated getter in ModelList and cleaned AssemblyCompare with previous version
changed the description
Good job!
Some small remarks:
ModelList.GetCurrentModel(): you don't check whether the currentModelIndex is out of bounds, it just crashes instead of returningnull. Have a look at the MinigameList to see how it's implemented over there.ModelListTest: Seperate the get and set in different test methods.ModelListTest: You do not have any tests for when the ModelList is empty.Fair remarks, I'll take them into consideration. I changed the Getter now to return the ModelTuple though as this makes your third point a lot easier to implement.
added 1 commit
be8885a5- Implemented MR feedbackCompare with previous version
Why are you now returning a ModelTuple? The reason why you put it in the ModeList class, is because it handles interior stuff for the ModelList. Don't make this visible to the outside world. I would suggest changing your code as follows:
more information can be found here
That is better indeed, I didnt know about the “?” Notation so I kind of struggled with demanding a model from an object that was possibly null. Ill change it
changed this line in version 5 of the diff
added 1 commit
a44532b9- Changed GetCurrentModel to return the model instead of the tupleCompare with previous version
approved this merge request
Isn't it easier to do something like this:
Don't know about the exact syntax of in, but this would be more readable, no?
It's okay for me how it is now too, just a suggestion though.
approved this merge request
mentioned in commit
b8cdcd128b