package pl.firmatpp.kierowca.domain

import org.junit.Assert.assertEquals
import org.junit.Test

class PhoneNumberFormatterTest {
    @Test
    fun normalizesPolishDriverPhoneForBackend() {
        assertEquals("48501222333", PhoneNumberFormatter.normalize("501 222 333"))
        assertEquals("48501222333", PhoneNumberFormatter.normalize("+48 501-222-333"))
        assertEquals("48501222333", PhoneNumberFormatter.normalize("0048 501 222 333"))
    }

    @Test
    fun masksPhoneLikeBackendResponse() {
        assertEquals("+48 *** *** 333", PhoneNumberFormatter.mask("48501222333"))
    }
}
