CodyEngel / fakek

A faker library for Kotlin.
Apache License 2.0
7 stars 6 forks source link

Enhancement / FakeCommerce #34

Closed RafaelPereiraSantos closed 3 years ago

RafaelPereiraSantos commented 3 years ago

Closes #19

Description

Creates a FakeCommerce that will works as a subtype of Company but, this class will fit things like address and products made by the company

Technical Details

change FakeCompany to sub type of Company Add a new class FakeCommerce subtype of Company that delegate to FakeCompany Add a utils folder in the tests with a FakeCompanyBaseTest with shared attributes and methods used for tests FakeCompay and its sub types (FakeCommerce)

Code Samples

Please provide code samples for how these changes will be used by applications consuming this library. Here's an example:

fun main() {
    val fakeCommerce: FakeCommer()
    println("${fakeCommerce.name} is a commerce located in ${fakeCommerce.address.streetName}, ${fakeCommerce.address.city} that deals with ${fakeCommerce.profession}")
}

Reviewers: @CodyEngel

codecov[bot] commented 3 years ago

Codecov Report

Merging #34 into main will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main      #34      +/-   ##
============================================
+ Coverage     98.64%   98.66%   +0.01%     
- Complexity       57       58       +1     
============================================
  Files            14       15       +1     
  Lines           148      150       +2     
  Branches          3        3              
============================================
+ Hits            146      148       +2     
  Misses            1        1              
  Partials          1        1              
Impacted Files Coverage Δ Complexity Δ
src/main/kotlin/dev/fakek/FakeContext.kt 96.29% <100.00%> (+0.14%) 1.00 <0.00> (ø)
src/main/kotlin/dev/fakek/fakes/FakeCommerce.kt 100.00% <100.00%> (ø) 1.00 <1.00> (?)
src/main/kotlin/dev/fakek/fakes/FakeCompany.kt 100.00% <100.00%> (ø) 11.00 <9.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e6c380a...3dfe2e3. Read the comment docs.

RafaelPereiraSantos commented 3 years ago

@CodyEngel we discussed in the #19 about Commerce has products but since there is no fake product implemented I will ask if I should implement in this pr too, or maybe create another issue to implement products and also get back to commerce and implement it as well (which I prefer to make small deliveries)