diff --git a/rxandroidble/src/test/groovy/com/polidea/rxandroidble2/exceptions/BleScanExceptionTest.groovy b/rxandroidble/src/test/groovy/com/polidea/rxandroidble2/exceptions/BleScanExceptionTest.groovy deleted file mode 100644 index 6041c00d0..000000000 --- a/rxandroidble/src/test/groovy/com/polidea/rxandroidble2/exceptions/BleScanExceptionTest.groovy +++ /dev/null @@ -1,23 +0,0 @@ -package com.polidea.rxandroidble2.exceptions - -import spock.lang.Specification - -import static com.polidea.rxandroidble2.exceptions.BleScanException.BLUETOOTH_DISABLED - -/** - * Tests BleScanException - */ -class BleScanExceptionTest extends Specification { - - BleScanException objectUnderTest - - def "toString should include message"() { - - when: - objectUnderTest = new BleScanException(BLUETOOTH_DISABLED) - - then: - assert objectUnderTest.toString() == - "com.polidea.rxandroidble2.exceptions.BleScanException: Bluetooth disabled (code 1)" - } -} diff --git a/rxandroidble/src/test/java/com/polidea/rxandroidble2/exceptions/BleScanExceptionTest.java b/rxandroidble/src/test/java/com/polidea/rxandroidble2/exceptions/BleScanExceptionTest.java new file mode 100644 index 000000000..d4d46ba4d --- /dev/null +++ b/rxandroidble/src/test/java/com/polidea/rxandroidble2/exceptions/BleScanExceptionTest.java @@ -0,0 +1,17 @@ +package com.polidea.rxandroidble2.exceptions; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +public class BleScanExceptionTest { + + @Test + public void toStringShouldContainMessage() { + // given + BleScanException out = new BleScanException(BleScanException.BLUETOOTH_DISABLED); + + // expect + assertEquals(out.toString(), "sscom.polidea.rxandroidble2.exceptions.BleScanException: Bluetooth disabled (code 1)"); + } +}