diff --git a/scratchoff/src/test/java/com/jackpocket/scratchoff/views/ScratchableLinearLayoutTests.kt b/scratchoff/src/test/java/com/jackpocket/scratchoff/views/ScratchableLinearLayoutTests.kt index 52e1a36..f5f9488 100644 --- a/scratchoff/src/test/java/com/jackpocket/scratchoff/views/ScratchableLinearLayoutTests.kt +++ b/scratchoff/src/test/java/com/jackpocket/scratchoff/views/ScratchableLinearLayoutTests.kt @@ -8,6 +8,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import com.jackpocket.scratchoff.LoggingScratchoffController import com.jackpocket.scratchoff.ScratchoffController import org.junit.Assert.assertEquals +import org.junit.Assert.assertNotNull import org.junit.Test import org.junit.runner.RunWith @@ -24,6 +25,12 @@ class ScratchableLinearLayoutTests { val controller = layout.scratchoffController as LoggingScratchoffController + @Test + fun testConstructorOverloads() { + assertNotNull(ScratchableLinearLayout(context, null).scratchoffController) + assertNotNull(ScratchableLinearLayout(context, null, 0).scratchoffController) + } + @Test fun testViewsDelegateOnDrawEvents() { assertEquals(0, controller.drawCount) diff --git a/scratchoff/src/test/java/com/jackpocket/scratchoff/views/ScratchableRelativeLayoutTests.kt b/scratchoff/src/test/java/com/jackpocket/scratchoff/views/ScratchableRelativeLayoutTests.kt index aa6f89e..cb4bc7d 100644 --- a/scratchoff/src/test/java/com/jackpocket/scratchoff/views/ScratchableRelativeLayoutTests.kt +++ b/scratchoff/src/test/java/com/jackpocket/scratchoff/views/ScratchableRelativeLayoutTests.kt @@ -8,6 +8,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import com.jackpocket.scratchoff.LoggingScratchoffController import com.jackpocket.scratchoff.ScratchoffController import org.junit.Assert.assertEquals +import org.junit.Assert.assertNotNull import org.junit.Test import org.junit.runner.RunWith @@ -24,6 +25,12 @@ class ScratchableRelativeLayoutTests { val controller = layout.scratchoffController as LoggingScratchoffController + @Test + fun testConstructorOverloads() { + assertNotNull(ScratchableRelativeLayout(context, null).scratchoffController) + assertNotNull(ScratchableRelativeLayout(context, null, 0).scratchoffController) + } + @Test fun testViewsDelegateOnDrawEvents() { assertEquals(0, controller.drawCount)