Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestions from code review
  • Loading branch information
jozkee authored Sep 1, 2022
commit 7da8858d2b71e2ad12db0b382e2b1377f7ba0d12
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ private async Task ReadFileFromDiskAndWriteToArchiveStreamAsEntryAsync(string fu
/// </item>
/// </list>
/// </remarks>
/// <exception cref="InvalidDataException">The entry type is <see cref="TarEntryType.HardLink"/> or <see cref="TarEntryType.SymbolicLink"/> and the <see cref="TarEntry.LinkName"/> is <see langword="null"/> or empty.</exception>
/// <exception cref="ArgumentException">The entry type is <see cref="TarEntryType.HardLink"/> or <see cref="TarEntryType.SymbolicLink"/> and the <see cref="TarEntry.LinkName"/> is <see langword="null"/> or empty.</exception>
/// <exception cref="ObjectDisposedException">The archive stream is disposed.</exception>
/// <exception cref="InvalidOperationException">The entry type of the <paramref name="entry"/> is not supported for writing.</exception>
/// <exception cref="IOException">An I/O problem occurred.</exception>
Expand Down Expand Up @@ -252,7 +252,7 @@ public void WriteEntry(TarEntry entry)
/// </item>
/// </list>
/// </remarks>
/// <exception cref="InvalidDataException">The entry type is <see cref="TarEntryType.HardLink"/> or <see cref="TarEntryType.SymbolicLink"/> and the <see cref="TarEntry.LinkName"/> is <see langword="null"/> or empty.</exception>
/// <exception cref="ArgumentException">The entry type is <see cref="TarEntryType.HardLink"/> or <see cref="TarEntryType.SymbolicLink"/> and the <see cref="TarEntry.LinkName"/> is <see langword="null"/> or empty.</exception>
/// <exception cref="ObjectDisposedException">The archive stream is disposed.</exception>
/// <exception cref="InvalidOperationException">The entry type of the <paramref name="entry"/> is not supported for writing.</exception>
/// <exception cref="IOException">An I/O problem occurred.</exception>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public void Write_LinkEntry_EmptyLinkName_Throws(TarEntryType entryType)
{
using MemoryStream archiveStream = new MemoryStream();
using TarWriter writer = new TarWriter(archiveStream, leaveOpen: false);
Assert.Throws<ArgumentException>(() => writer.WriteEntry(new GnuTarEntry(entryType, "link")));
Assert.Throws<ArgumentException>("entry", () => writer.WriteEntry(new GnuTarEntry(entryType, "link")));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ public void Write_LinkEntry_EmptyLinkName_Throws(TarEntryType entryType)
{
using MemoryStream archiveStream = new MemoryStream();
using TarWriter writer = new TarWriter(archiveStream, leaveOpen: false);
Assert.Throws<ArgumentException>(() => writer.WriteEntry(new PaxTarEntry(entryType, "link")));
Assert.Throws<ArgumentException>("entry", () => writer.WriteEntry(new PaxTarEntry(entryType, "link")));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public void Write_LinkEntry_EmptyLinkName_Throws(TarEntryType entryType)
{
using MemoryStream archiveStream = new MemoryStream();
using TarWriter writer = new TarWriter(archiveStream, leaveOpen: false);
Assert.Throws<ArgumentException>(() => writer.WriteEntry(new UstarTarEntry(entryType, "link")));
Assert.Throws<ArgumentException>("entry", () => writer.WriteEntry(new UstarTarEntry(entryType, "link")));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void Write_LinkEntry_EmptyLinkName_Throws(TarEntryType entryType)
{
using MemoryStream archiveStream = new MemoryStream();
using TarWriter writer = new TarWriter(archiveStream, leaveOpen: false);
Assert.Throws<ArgumentException>(() => writer.WriteEntry(new V7TarEntry(entryType, "link")));
Assert.Throws<ArgumentException>("entry", () => writer.WriteEntry(new V7TarEntry(entryType, "link")));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public async Task Write_LinkEntry_EmptyLinkName_Throws_Async(TarEntryType entryT
{
await using MemoryStream archiveStream = new MemoryStream();
await using TarWriter writer = new TarWriter(archiveStream, leaveOpen: false);
await Assert.ThrowsAsync<ArgumentException>(async () => await writer.WriteEntryAsync(new GnuTarEntry(entryType, "link")));
await Assert.ThrowsAsync<ArgumentException>("entry", () => writer.WriteEntryAsync(new GnuTarEntry(entryType, "link")));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ public async Task Write_LinkEntry_EmptyLinkName_Throws_Async(TarEntryType entryT
{
await using MemoryStream archiveStream = new MemoryStream();
await using TarWriter writer = new TarWriter(archiveStream, leaveOpen: false);
await Assert.ThrowsAsync<ArgumentException>(async () => await writer.WriteEntryAsync(new PaxTarEntry(entryType, "link")));
await Assert.ThrowsAsync<ArgumentException>("entry", () => writer.WriteEntryAsync(new PaxTarEntry(entryType, "link")));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public async Task Write_LinkEntry_EmptyLinkName_Throws_Async(TarEntryType entryT
{
await using MemoryStream archiveStream = new MemoryStream();
await using TarWriter writer = new TarWriter(archiveStream, leaveOpen: false);
await Assert.ThrowsAsync<ArgumentException>(async () => await writer.WriteEntryAsync(new UstarTarEntry(entryType, "link")));
await Assert.ThrowsAsync<ArgumentException>("entry", () => writer.WriteEntryAsync(new UstarTarEntry(entryType, "link")));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public async Task Write_LinkEntry_EmptyLinkName_Throws_Async(TarEntryType entryT
{
await using MemoryStream archiveStream = new MemoryStream();
await using TarWriter writer = new TarWriter(archiveStream, leaveOpen: false);
await Assert.ThrowsAsync<ArgumentException>(async () => await writer.WriteEntryAsync(new V7TarEntry(entryType, "link")));
await Assert.ThrowsAsync<ArgumentException>("entry", () => writer.WriteEntryAsync(new V7TarEntry(entryType, "link")));
}
}
}