| 279 | } |
| 280 | |
| 281 | func TestRenderInvalidBoxStyle(t *testing.T) { |
| 282 | b := NewBox().Padding(2, 1).Style(BoxStyle("InvalidStyle")) |
| 283 | _, err := b.Render("Title", "Content") |
| 284 | if err == nil { |
| 285 | t.Fatalf("expected error for invalid Box style, got nil") |
| 286 | } |
| 287 | if !strings.Contains(err.Error(), "invalid Box style") { |
| 288 | t.Errorf("unexpected error message: %v", err) |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | func TestRenderInvalidTitlePosition(t *testing.T) { |
| 293 | b := NewBox().Padding(2, 1).Style(Single).TitlePosition(TitlePosition("Weird")) |