CodyEngel / fakek

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

#45 FakeSSN #49

Closed Nowele closed 3 years ago

Nowele commented 3 years ago

Closes #45

Description

Creation of FakeSSN as a wrapper for IdNumber that returns a valid SSN.

Technical Details

  1. Added FakeSSN data class to provide a fakeSSN with a constructor that accepts FakerSSN.
  2. Added FakeSSNTest class to test the FakeSSN class.
  3. Updated FakeContext to add fakeSSN and fakerSSN.
  4. Updated FakeContextTest to test fakeSSN.
  5. Updated FakerTypeAliases to add FakerSSN as an alias of IdNumber

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 fakeSSN: FakeSSN(ssn="AAA-GG-SSSS")
    fakek { println("fakeSSN: $fakeSSN") }
}

Reviewers: @CodyEngel

Nowele commented 3 years ago

Converted to draft since I haven't been assigned the issue yet, feel free to close if it was assigned to someone else :)

codecov[bot] commented 3 years ago

Codecov Report

Merging #49 into main will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               main      #49   +/-   ##
=========================================
  Coverage     99.11%   99.11%           
  Complexity       95       95           
=========================================
  Files            21       21           
  Lines           225      226    +1     
  Branches          3        3           
=========================================
+ Hits            223      224    +1     
  Misses            1        1           
  Partials          1        1           
Impacted Files Coverage Δ Complexity Δ
src/main/kotlin/dev/fakek/FakeContext.kt 97.43% <100.00%> (ø) 1.00 <0.00> (ø)
src/main/kotlin/dev/fakek/fakes/FakeSSN.kt 100.00% <100.00%> (ø) 5.00 <5.00> (?)
src/main/kotlin/dev/fakek/fakes/FakeAviation.kt

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 46921ce...1595bac. Read the comment docs.

CodyEngel commented 3 years ago

Hey @Nowele assigned this to you, the initial changes look good. I was hoping to include valid and invalid options for SSN, it looks like you have valid could you add invalid as well? After that the changes should be good to merge. Thank you :)

Nowele commented 3 years ago

Hey @Nowele assigned this to you, the initial changes look good. I was hoping to include valid and invalid options for SSN, it looks like you have valid could you add invalid as well? After that the changes should be good to merge. Thank you :)

Apologies for the delay! I've resolved conflicts and addressed your feedback.