Skip to content

Commit

Permalink
adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ashahabov committed Nov 19, 2022
1 parent 4c07fe6 commit 93554ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ShapeCrawler.Tests/ShapeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ public void Y_Setter_sets_y_coordinate(IShape shape)

// Assert
shape.Y.Should().Be(100);
var errors = PptxValidator.Validate(shape.SlideObject.Presentation);
errors.Should().BeEmpty();
}

[Theory]
Expand All @@ -265,6 +267,8 @@ public void X_Setter_sets_x_coordinate(IShape shape)
pres = SCPresentation.Open(stream);
shape = pres.Slides[slideIndex].Shapes.GetByName<IShape>(shapeName);
shape.X.Should().Be(400);
var errors = PptxValidator.Validate(shape.SlideObject.Presentation);
errors.Should().BeEmpty();
}

[Fact]
Expand All @@ -283,8 +287,9 @@ public void Width_Setter_sets_width()
pres.SaveAs(stream);
pres = SCPresentation.Open(stream);
shape = pres.Slides.First().Shapes.First(sp => sp.Id == 3);

shape.Width.Should().Be(widthPixels);
var errors = PptxValidator.Validate(shape.SlideObject.Presentation);
errors.Should().BeEmpty();
}

[Fact]
Expand Down
2 changes: 2 additions & 0 deletions ShapeCrawler.Tests/TextFrameTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ public void Text_Setter_resizes_shape_to_fit_text()
// Assert
shape.Height.Should().Be(46);
shape.Y.Should().Be(152);
var errors = PptxValidator.Validate(shape.SlideObject.Presentation);
errors.Should().BeEmpty();
}

[Theory]
Expand Down

0 comments on commit 93554ae

Please sign in to comment.