package de.trainingstagebuch.app.utils

import de.trainingstagebuch.app.R
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Test

class ValidationUtilsTest {

    @Test
    fun `requireAllNotBlank returns message when one value blank`() {
        assertEquals(
            R.string.error_unknown,
            ValidationUtils.requireAllNotBlank(R.string.error_unknown, "a", "")
        )
    }

    @Test
    fun `requireEquals returns null when equal`() {
        assertNull(ValidationUtils.requireEquals("x", "x", R.string.error_unknown))
    }
}
