Skip to content

Instantly share code, notes, and snippets.

@phellipealexandre
Created December 18, 2019 03:19
Show Gist options
  • Save phellipealexandre/ea78d405a16e8e3691eb2f929f43725d to your computer and use it in GitHub Desktop.
Save phellipealexandre/ea78d405a16e8e3691eb2f929f43725d to your computer and use it in GitHub Desktop.
class CarTest {
private lateinit var car: Car
@Before
fun setUp() {
car = Car()
}
@Test
fun `Should increase speed given an acceleration and time`() {
car.accelerate(newAcceleration = 5, timeWindow = 3)
val currentSpeed = car.getCurrentSpeed()
assertEquals(15, currentSpeed)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment