package steme

import (
	"testing"
)

// TestObjectValueConstructors tests the object value constructor functions.
func TestObjectValueConstructors(t *testing.T) {
	tests := []struct {
		name      string
		value     ObjectValue
		wantType  string
		wantValue any
	}{
		{
			name:      "text value",
			value:     NewTextValue("hello"),
			wantType:  "Text",
			wantValue: "hello",
		},
		{
			name:      "number value",
			value:     NewNumberValue(42.5),
			wantType:  "Number",
			wantValue: 42.5,
		},
		{
			name:      "boolean value",
			value:     NewBooleanValue(true),
			wantType:  "Boolean",
			wantValue: true,
		},
		{
			name:      "reference value",
			value:     NewReferenceValue("Entity_Id"),
			wantType:  "Reference",
			wantValue: "Entity_Id",
		},
	}

	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			if tt.value.Type != tt.wantType {
				t.Errorf("Type = %s, want %s", tt.value.Type, tt.wantType)
			}

			if tt.value.Value != tt.wantValue {
				t.Errorf("Value = %v, want %v", tt.value.Value, tt.wantValue)
			}
		})
	}
}
