Skip to content

Commit

Permalink
fix: comment broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-tihon committed Sep 8, 2024
1 parent b59f517 commit d211648
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
8 changes: 2 additions & 6 deletions Clippit.Tests/Word/PowerToolsBlockExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@

namespace Clippit.Tests.Word
{
public class PowerToolsBlockExtensionsTests : TestsBase
public class PowerToolsBlockExtensionsTests(ITestOutputHelper log) : TestsBase(log)
{
public PowerToolsBlockExtensionsTests(ITestOutputHelper log) : base(log)
{
}

[Fact]
public void MustBeginPowerToolsBlockToUsePowerTools()
{
Expand Down Expand Up @@ -81,7 +77,7 @@ public void MustBeginPowerToolsBlockToUsePowerTools()
Assert.Equal("Second", paragraphElements[1].Value);
}

[Fact]
[Fact(Skip = "Since v3.1 OpenXML SDK unload part root element on content stream Dispose.")]
public void MustEndPowerToolsBlockToUseStronglyTypedClasses()
{
using var stream = new MemoryStream();
Expand Down
6 changes: 3 additions & 3 deletions Clippit/Core/PowerToolsBlockExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static class PowerToolsBlockExtensions
/// </param>
public static void BeginPowerToolsBlock(this OpenXmlPackage package)
{
if (package is null) throw new ArgumentNullException(nameof(package));
ArgumentNullException.ThrowIfNull(package);

package.RemovePowerToolsAnnotations();
package.Save();
Expand All @@ -44,7 +44,7 @@ public static void BeginPowerToolsBlock(this OpenXmlPackage package)
/// </param>
public static void EndPowerToolsBlock(this OpenXmlPackage package)
{
if (package is null) throw new ArgumentNullException(nameof(package));
ArgumentNullException.ThrowIfNull(package);

foreach (var part in package.GetAllParts())
{
Expand All @@ -55,7 +55,7 @@ public static void EndPowerToolsBlock(this OpenXmlPackage package)

private static void RemovePowerToolsAnnotations(this OpenXmlPackage package)
{
if (package is null) throw new ArgumentNullException(nameof(package));
ArgumentNullException.ThrowIfNull(package);

foreach (var part in package.GetAllParts())
{
Expand Down
2 changes: 1 addition & 1 deletion Clippit/PtOpenXmlUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public static XDocument GetXDocument(this OpenXmlPart part, out XmlNamespaceMana

public static void PutXDocument(this OpenXmlPart part)
{
if (part is null) throw new ArgumentNullException(nameof(part));
ArgumentNullException.ThrowIfNull(part);

var partXDocument = part.GetXDocument();
if (partXDocument != null)
Expand Down

0 comments on commit d211648

Please sign in to comment.