CodyEngel / fakek

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

Adding FakeBoolean #27

Closed Caps-Looking closed 3 years ago

Caps-Looking commented 3 years ago

Closes #26

Description

Adds fakeBoolean to FakeContext to enable easier testing of true/false scenarios.

Technical Details

Code Samples

fun main() {
    val fakeBoolean: FakeBoolean(boolean=true)
    fakek { println("fakeBoolean: $fakeBoolean") }
}

Reviewers: @CodyEngel

CodyEngel commented 3 years ago

Hey @Caps-Looking thanks for the pull request, it looks like it's currently failing on run_detekt. You can run the static analysis check locally by executing ./gradlew detekt from terminal.

Also please update the PR description to follow this template, once that is updated I can review the PR.

codecov[bot] commented 3 years ago

Codecov Report

Merging #27 into main will increase coverage by 0.08%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main      #27      +/-   ##
============================================
+ Coverage     97.93%   98.01%   +0.08%     
- Complexity       34       36       +2     
============================================
  Files            10       11       +1     
  Lines            97      101       +4     
  Branches          4        4              
============================================
+ Hits             95       99       +4     
  Partials          2        2              
Impacted Files Coverage Δ Complexity Δ
src/main/kotlin/dev/fakek/FakeContext.kt 100.00% <100.00%> (ø) 1.00 <0.00> (ø)
src/main/kotlin/dev/fakek/fakes/FakeBoolean.kt 100.00% <100.00%> (ø) 2.00 <2.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 30c1bb2...7cadb52. Read the comment docs.

Caps-Looking commented 3 years ago

I had some problems to run ./gradlew detekt with java 14 jdk, because this gradle version doesn't support java 14. To solve that, I had to upgrade the gradle version to 6.3. If you want to, I can create an issue to do the upgrade and make the PR.

CodyEngel commented 3 years ago

I had some problems to run ./gradlew detekt with java 14 jdk, because this gradle version doesn't support java 14. To solve that, I had to upgrade the gradle version to 6.3. If you want to, I can create an issue to do the upgrade and make the PR.

@Caps-Looking feel free to create an issue for this, I'm happy assigning it to you if you'd like to take care of the upgrade. Thanks for catching this, most of my development is done with jdk 12.

Caps-Looking commented 3 years ago

I did the changes that you requested. You can merge whenever you want.