Skip to content
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

Merged

Conversation

Robbware
Copy link
Contributor

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the COMET-WEB code style guidelines
  • I have provided test coverage for my change (where applicable)

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.

@Robbware Robbware added the enhancement New feature or request label Oct 18, 2023
@Robbware Robbware self-assigned this Oct 18, 2023
Copy link
Contributor

@antoineatstariongroup antoineatstariongroup left a 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(() =>
Copy link
Contributor

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

@Robbware Robbware changed the title Feat/move bookconfiguration to configurationservices Feat/add-namingconventions-service-and-cherrypick Oct 18, 2023
… and WASM modes. Add new test fixtures for WASM mode. Add two loading types (file loading and via http request).
/// <exception cref="NotImplementedException"></exception>
public virtual Task<IReadOnlyDictionary<string, string>> GetNamingConventionConfiguration()
{
throw new NotImplementedException();
Copy link
Contributor

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 ?

Copy link
Contributor Author

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

Copy link
Contributor

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

… GetNamingConventionConfiguration method as abstract too
…ld only be used and/or seen by the classes that implement the BaseNamingConventionService
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

88.5% 88.5% Coverage
0.0% 0.0% Duplication

warning 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.
Read more here

@Robbware Robbware merged commit e89c8ab into development Oct 19, 2023
7 checks passed
@Robbware Robbware deleted the Feat/move-bookconfiguration-to-configurationservices branch October 19, 2023 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants