sbabcoc / JUnit-Foundation

JUnit Foundation is a lightweight collection of JUnit watchers, interfaces, and static utility classes that supplement and augment the functionality provided by the JUnit API.
Apache License 2.0
22 stars 6 forks source link

Incompatible with Kotlin's DSL #40

Closed groov1kk closed 5 years ago

groov1kk commented 5 years ago

As Kotlin provides to use multi-word method names, it is make incompatible to use this library with Kotlin's tests which use such methods.

There is an explicit splitting of test names inside of AtomicTest class constructor. Providing multi-word method name, this constructor takes only the first word of this method's name and tries to find this name in given particles. Of course it will find nothing.

Steps to reproduce:

  1. Create Kotlin class.
  2. Create test method using multi-words syntax (for example fun 'some method'() {...})
  3. Integrate it with JUnit-Foundation and run test

Expected behavior:

AtomicTest class constructor initializes identity field with created method.

Actual behavior:

AtomicTest class constructor does not initializes identity field.

sbabcoc commented 5 years ago

This issue is resolved by https://github.com/Nordstrom/JUnit-Foundation/pull/41