package handlers

import (
	"testing"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
)

func TestParseUUID_Library(t *testing.T) {
	validUUID := "f47ac10b-58cc-4372-a567-0e02b2c3d479"

	result, err := parseUUID(validUUID)
	require.NoError(t, err)
	assert.True(t, result.Valid)
}

func TestParseUUID_Invalid(t *testing.T) {
	tests := []struct {
		name  string
		input string
	}{
		{"not a uuid", "not-a-uuid"},
		{"empty", ""},
		{"wrong format", "f47ac10b-58cc-4372"},
	}

	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			_, err := parseUUID(tt.input)
			assert.Error(t, err)
		})
	}
}
