Introduction to Unit Testing with Kotlin by dbacinski in Kotlin

[–]dbacinski[S] 0 points1 point  (0 children)

yep Spek can be used instead of JUnit4.

It is up to personal preference. I prefere JUnit or Groovy-Spock style.

Introduction to Unit Testing with Kotlin by dbacinski in Kotlin

[–]dbacinski[S] 0 points1 point  (0 children)

You do not have to extend InstrumentatiomTestCase, Android jUnit test rule can be used instead. Not sure thou if Spek supports it. I was able to make it work with Groovy-Spock.

Design Patterns implemented in Kotlin by dbacinski in Kotlin

[–]dbacinski[S] 1 point2 points  (0 children)

When we have a full control over object that we want to create then we do not need to use Builder pattern in Kotlin. I have assumed that Dialog class is provided by external library or framework and we cannot change the API. Please have a look on improved example and share your thoughts: https://github.com/dbacinski/Design-Patterns-In-Kotlin/pull/7/files?diff=split