-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feat/add-namingconventions-service-and-cherrypick #481
Feat/add-namingconventions-service-and-cherrypick #481
Conversation
…it can work for any type of enum that is provided via IOC
…it can work for any type of enum that is provided via IOC
…https://github.com/RHEAGROUP/COMET-WEB-Community-Edition into Feat/move-bookconfiguration-to-configurationservices
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The namingConventionService implementation should be split in 2 : one for the Server (with the current implementation) and one for WASM (that requires the HttpClient)
|
||
foreach (var namingConventionKind in enumValues) | ||
{ | ||
Assert.Multiple(() => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move the assert.Multiple around the foreach
… and WASM modes. Add new test fixtures for WASM mode. Add two loading types (file loading and via http request).
COMET.Web.Common.Tests/Utilities/CherryPick/CherryPickRunnerTestFixture.cs
Outdated
Show resolved
Hide resolved
...mon.Tests/WebAssembly/Services/NamingConventionService/NamingConventionServiceTestFixture.cs
Outdated
Show resolved
Hide resolved
COMET.Web.Common/Server/Services/NamingConventionService/NamingConventionService.cs
Show resolved
Hide resolved
COMET.Web.Common/Server/Services/NamingConventionService/NamingConventionService.cs
Show resolved
Hide resolved
COMET.Web.Common/Services/NamingConventionService/BaseNamingConventionService.cs
Outdated
Show resolved
Hide resolved
COMET.Web.Common/Services/NamingConventionService/BaseNamingConventionService.cs
Outdated
Show resolved
Hide resolved
COMET.Web.Common/Services/NamingConventionService/BaseNamingConventionService.cs
Outdated
Show resolved
Hide resolved
/// <exception cref="NotImplementedException"></exception> | ||
public virtual Task<IReadOnlyDictionary<string, string>> GetNamingConventionConfiguration() | ||
{ | ||
throw new NotImplementedException(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why throwing exception there? You could just return the definedNaming dictionary ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be a bit irrelevant for this method as that collection hasn't been filled up - the goal would be for any class that inherit this one would have to override this method themselves, depending on how they want to retrieve the configuration.
I could, however, just return an empty dictionary, if you prefer it like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood, took me a bit time to follow your implementation. My recommendation for this case : put the Base class as abstract and set that method abstract also. It will force any subclass to implement it (which is what we want). That base class will never be used as a concrete class anyway
COMET.Web.Common/Services/NamingConventionService/INamingConventionService.cs
Show resolved
Hide resolved
COMET.Web.Common/Services/NamingConventionService/INamingConventionService.cs
Outdated
Show resolved
Hide resolved
… GetNamingConventionConfiguration method as abstract too
…ld only be used and/or seen by the classes that implement the BaseNamingConventionService
Kudos, SonarCloud Quality Gate passed! 0 Bugs 88.5% Coverage The version of Java (11.0.20.1) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
Prerequisites
Description
This allows for the common library to have access to a better layer of the CherryPick functionality and a structured and predefined way of accessing the NamingConventions configuration.