MCPcopy Index your code
hub / github.com/box-cli-maker/box-cli-maker / TestRenderInvalidBoxStyle

Function TestRenderInvalidBoxStyle

box_render_test.go:281–290  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

279}
280
281func 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
292func TestRenderInvalidTitlePosition(t *testing.T) {
293 b := NewBox().Padding(2, 1).Style(Single).TitlePosition(TitlePosition("Weird"))

Callers

nothing calls this directly

Calls 5

NewBoxFunction · 0.85
BoxStyleTypeAlias · 0.85
StyleMethod · 0.80
PaddingMethod · 0.80
RenderMethod · 0.80

Tested by

no test coverage detected