(t *testing.T)
| 35 | } |
| 36 | |
| 37 | func TestSlidesElementCreateShape(t *testing.T) { |
| 38 | request := captureSlidesElementRequest(t, &SlidesElementCreateShapeCmd{ |
| 39 | PresentationID: "pres1", |
| 40 | SlideID: "slide1", |
| 41 | Type: "round-rectangle", |
| 42 | X: 12, |
| 43 | Y: 24, |
| 44 | Width: 200, |
| 45 | Height: 80, |
| 46 | Unit: "PT", |
| 47 | ObjectID: "shape_123", |
| 48 | }, &RootFlags{Account: "a@b.com"}) |
| 49 | |
| 50 | create := request.CreateShape |
| 51 | if create == nil { |
| 52 | t.Fatalf("expected createShape, got %+v", request) |
| 53 | } |
| 54 | if create.ObjectId != "shape_123" || create.ShapeType != "ROUND_RECTANGLE" { |
| 55 | t.Fatalf("unexpected createShape: %+v", create) |
| 56 | } |
| 57 | properties := create.ElementProperties |
| 58 | if properties.PageObjectId != "slide1" || properties.Size.Width.Magnitude != 200 || properties.Size.Height.Magnitude != 80 { |
| 59 | t.Fatalf("unexpected element properties: %+v", properties) |
| 60 | } |
| 61 | if properties.Transform.TranslateX != 12 || properties.Transform.TranslateY != 24 || properties.Transform.ScaleX != 1 || properties.Transform.ScaleY != 1 { |
| 62 | t.Fatalf("unexpected transform: %+v", properties.Transform) |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | func TestSlidesElementCreateLinePreservesZeroExtent(t *testing.T) { |
| 67 | properties := slidesElementProperties("slide1", 0, 0, 120, 0, "PT") |
nothing calls this directly
no test coverage detected