package com.doctate.watch.domain

import com.google.common.truth.Truth.assertThat
import org.junit.Test

class CaseIdTest {
    private val uuidV4Pattern =
        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"

    @Test fun new_returns_uuid_v4_string() {
        val id = CaseId.new()
        assertThat(id).matches(uuidV4Pattern)
    }

    @Test fun new_returns_distinct_uuids() {
        val a = CaseId.new()
        val b = CaseId.new()
        assertThat(a).isNotEqualTo(b)
    }
}
