Skip to content

Add Zodiac Signs provider#658

Merged
bodiam merged 1 commit intodatafaker-net:mainfrom
kingthorin:add-zodiac
Jan 30, 2023
Merged

Add Zodiac Signs provider#658
bodiam merged 1 commit intodatafaker-net:mainfrom
kingthorin:add-zodiac

Conversation

@kingthorin
Copy link
Collaborator

  • BaseProvider.java > Hook Zodiac class.
  • EnFile.java > Include Zodiac.yml.
  • Zodiac.java > New Provider class.
  • zodiac.yml > New data file for Zodiac signs.
  • ZodiacTest.java > Unit Test for new provider.

Signed-off-by: kingthorin kingthorin@users.noreply.github.com

- BaseProvider.java > Hook Zodiac class.
- EnFile.java > Include Zodiac.yml.
- Zodiac.java > New Provider class.
- zodiac.yml > New data file for Zodiac signs.
- ZodiacTest.java > Unit Test for new provider.

Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
@what-the-diff
Copy link

what-the-diff bot commented Jan 30, 2023

  • Added a new provider called Zodiac.
  • Updated the EnFile class to include zodiac in its list of files that are loaded into memory when Faker is initialized.
  • Created a test for this new provider and added it to BaseFakerTest's suite of tests so that we can run all our unit tests at once with Maven (mvn clean install).

Comment on lines +10 to +13
@Test
void testSign() {
assertThat(faker.zodiac().sign()).isNotEmpty();
}
Copy link
Collaborator Author

@kingthorin kingthorin Jan 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to align this with #657 if it's accepted.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to further improve the test, that is fine, but this is quite in line with a majority of the test (most of them have been generated, and just make sure the basics work), so happy to accept it as is.

@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2023

Codecov Report

Merging #658 (74a5ac9) into main (d57cc7c) will increase coverage by 0.01%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main     #658      +/-   ##
============================================
+ Coverage     92.73%   92.74%   +0.01%     
- Complexity     2623     2627       +4     
============================================
  Files           281      282       +1     
  Lines          5397     5419      +22     
  Branches        589      589              
============================================
+ Hits           5005     5026      +21     
- Misses          241      242       +1     
  Partials        151      151              
Impacted Files Coverage Δ
...va/net/datafaker/providers/base/BaseProviders.java 100.00% <100.00%> (ø)
...main/java/net/datafaker/providers/base/Zodiac.java 100.00% <100.00%> (ø)
.../main/java/net/datafaker/service/files/EnFile.java 93.33% <100.00%> (ø)
...net/datafaker/transformations/JsonTransformer.java 92.92% <0.00%> (+0.28%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@bodiam
Copy link
Contributor

bodiam commented Jan 30, 2023

Hi @kingthorin , this one looks fine to me too! Thanks!

@bodiam bodiam merged commit 990debe into datafaker-net:main Jan 30, 2023
@kingthorin kingthorin deleted the add-zodiac branch January 30, 2023 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants