(t *testing.T)
| 64 | } |
| 65 | |
| 66 | func TestEncoder_Encode_JSONCompact(t *testing.T) { |
| 67 | e := NewEncoder() |
| 68 | openAPI := model.NewOpenAPI() |
| 69 | openAPI.Info.Title = "Test API" |
| 70 | |
| 71 | result, err := e.Encode(openAPI, "json", false) |
| 72 | if err != nil { |
| 73 | t.Fatalf("unexpected error: %v", err) |
| 74 | } |
| 75 | if strings.Contains(result, "\n ") { |
| 76 | t.Error("compact JSON should not contain indentation") |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | func TestEncoder_Encode_YAML(t *testing.T) { |
| 81 | e := NewEncoder() |
nothing calls this directly
no test coverage detected