package solutions.tretter.mindmachine

import solutions.tretter.mindmachine.session.TimelineEditorState
import org.junit.Assert.assertEquals
import org.junit.Test

class DurationSliderRangeTest {
    @Test
    fun timeline_duration_clamps_to_one_minute_and_sixty_minutes() {
        assertEquals(60, TimelineEditorState.default(30).durationSec)
        assertEquals(60 * 60, TimelineEditorState.default(9 * 60 * 60).durationSec)
    }

    @Test
    fun timeline_duration_snaps_to_whole_minutes() {
        assertEquals(2 * 60, TimelineEditorState.default(91).durationSec)
    }
}
