MCPcopy Create free account
hub / github.com/openclaw/gogcli / captureSlidesElementRequest

Function captureSlidesElementRequest

internal/cmd/slides_element_test.go:21–35  ·  view source on GitHub ↗
(t *testing.T, runner slidesElementTestRunner, flags *RootFlags)

Source from the content-addressed store, hash-verified

19func float64ElementTestPtr(value float64) *float64 { return &value }
20
21func captureSlidesElementRequest(t *testing.T, runner slidesElementTestRunner, flags *RootFlags) *slides.Request {
22 t.Helper()
23 var captured []*slides.Request
24 srv := mockSlidesBatchUpdateServer(t, &captured, map[string]any{"presentationId": "pres1", "replies": []any{map[string]any{}}})
25 defer srv.Close()
26
27 ctx := withSlidesTestService(newCmdRuntimeOutputContext(t, io.Discard, io.Discard), newSlidesServiceFromServer(t, srv))
28 if err := runner.Run(ctx, flags); err != nil {
29 t.Fatalf("Run: %v", err)
30 }
31 if len(captured) != 1 {
32 t.Fatalf("captured %d requests, want 1", len(captured))
33 }
34 return captured[0]
35}
36
37func TestSlidesElementCreateShape(t *testing.T) {
38 request := captureSlidesElementRequest(t, &SlidesElementCreateShapeCmd{

Calls 6

withSlidesTestServiceFunction · 0.85
CloseMethod · 0.65
RunMethod · 0.65

Tested by

no test coverage detected