#57 added @Test annotation in overridden methods
This commit is contained in:
parent
b1fd0691f7
commit
e43589c500
3 changed files with 11 additions and 0 deletions
|
@ -3,12 +3,14 @@ package be.ugent.sel.studeez.timer_functional
|
||||||
import be.ugent.sel.studeez.data.local.models.timer_functional.FunctionalCustomTimer
|
import be.ugent.sel.studeez.data.local.models.timer_functional.FunctionalCustomTimer
|
||||||
import be.ugent.sel.studeez.data.local.models.timer_functional.FunctionalTimer
|
import be.ugent.sel.studeez.data.local.models.timer_functional.FunctionalTimer
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
|
import org.junit.Test
|
||||||
|
|
||||||
class FunctionalCustomTimerUnitTest : FunctionalTimerUnitTest() {
|
class FunctionalCustomTimerUnitTest : FunctionalTimerUnitTest() {
|
||||||
override fun setTimer() {
|
override fun setTimer() {
|
||||||
timer = FunctionalCustomTimer(time)
|
timer = FunctionalCustomTimer(time)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
override fun testOneTick() {
|
override fun testOneTick() {
|
||||||
timer.tick()
|
timer.tick()
|
||||||
Assert.assertEquals(
|
Assert.assertEquals(
|
||||||
|
@ -17,6 +19,7 @@ class FunctionalCustomTimerUnitTest : FunctionalTimerUnitTest() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
override fun multipleTicks() {
|
override fun multipleTicks() {
|
||||||
val n = 10
|
val n = 10
|
||||||
for (i in 1..n) {
|
for (i in 1..n) {
|
||||||
|
@ -28,6 +31,7 @@ class FunctionalCustomTimerUnitTest : FunctionalTimerUnitTest() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
override fun testEnded() {
|
override fun testEnded() {
|
||||||
timer = FunctionalCustomTimer(0)
|
timer = FunctionalCustomTimer(0)
|
||||||
timer.tick()
|
timer.tick()
|
||||||
|
|
|
@ -3,12 +3,14 @@ package be.ugent.sel.studeez.timer_functional
|
||||||
import be.ugent.sel.studeez.data.local.models.timer_functional.FunctionalEndlessTimer
|
import be.ugent.sel.studeez.data.local.models.timer_functional.FunctionalEndlessTimer
|
||||||
import be.ugent.sel.studeez.data.local.models.timer_functional.FunctionalTimer
|
import be.ugent.sel.studeez.data.local.models.timer_functional.FunctionalTimer
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
|
import org.junit.Test
|
||||||
|
|
||||||
class FunctionalEndlessTimerUnitTest : FunctionalTimerUnitTest() {
|
class FunctionalEndlessTimerUnitTest : FunctionalTimerUnitTest() {
|
||||||
override fun setTimer() {
|
override fun setTimer() {
|
||||||
timer = FunctionalEndlessTimer()
|
timer = FunctionalEndlessTimer()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
override fun testOneTick() {
|
override fun testOneTick() {
|
||||||
timer.tick()
|
timer.tick()
|
||||||
Assert.assertEquals(
|
Assert.assertEquals(
|
||||||
|
@ -17,6 +19,7 @@ class FunctionalEndlessTimerUnitTest : FunctionalTimerUnitTest() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
override fun multipleTicks() {
|
override fun multipleTicks() {
|
||||||
val n = 10
|
val n = 10
|
||||||
for (i in 1..n) {
|
for (i in 1..n) {
|
||||||
|
@ -28,6 +31,7 @@ class FunctionalEndlessTimerUnitTest : FunctionalTimerUnitTest() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
override fun testEnded() {
|
override fun testEnded() {
|
||||||
val n = 1000
|
val n = 1000
|
||||||
for (i in 1..n) {
|
for (i in 1..n) {
|
||||||
|
|
|
@ -17,6 +17,7 @@ class FuntionalPomodoroTimerUnitTest : FunctionalTimerUnitTest() {
|
||||||
pomodoroTimer = FunctionalPomodoroTimer(time, breakTime, breaks)
|
pomodoroTimer = FunctionalPomodoroTimer(time, breakTime, breaks)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
override fun testOneTick() {
|
override fun testOneTick() {
|
||||||
pomodoroTimer.tick()
|
pomodoroTimer.tick()
|
||||||
Assert.assertEquals(
|
Assert.assertEquals(
|
||||||
|
@ -34,6 +35,7 @@ class FuntionalPomodoroTimerUnitTest : FunctionalTimerUnitTest() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
override fun multipleTicks() {
|
override fun multipleTicks() {
|
||||||
val n = 10
|
val n = 10
|
||||||
for (i in 1..n) {
|
for (i in 1..n) {
|
||||||
|
@ -45,6 +47,7 @@ class FuntionalPomodoroTimerUnitTest : FunctionalTimerUnitTest() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
override fun testEnded() {
|
override fun testEnded() {
|
||||||
pomodoroTimer = FunctionalPomodoroTimer(0, 0, 0)
|
pomodoroTimer = FunctionalPomodoroTimer(0, 0, 0)
|
||||||
pomodoroTimer.tick()
|
pomodoroTimer.tick()
|
||||||
|
|
Reference in a new issue