package schemagen

import (
	"strings"
	"testing"
)

func TestDebugGen(t *testing.T) {
	s, err := Load("../../schema/schema.json")
	if err != nil {
		t.Fatal(err)
	}
	gen := NewGenerator(s)
	files := gen.GenerateAll()
	for f, content := range files {
		t.Logf("File: %s (%d bytes)", f, len(content))
		// Check for enum types
		if strings.Contains(content, "type Role string") {
			t.Logf("  -> contains Role enum!")
		}
	}
	// Show full types.go
	if content, ok := files["types.go"]; ok {
		t.Logf("types.go FULL:\n%s", content)
	}
}
