Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 6 additions & 6 deletions Semantics.Test/Paths/AbsoluteDirectoryPathParentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ public void Parent_OfRoot_ReturnsTheRootItself()
Assert.AreEqual(root, root.Parent);
}

/// <remarks>
/// UNC paths are Windows-only, so the test is skipped elsewhere rather than reporting
/// inconclusive from inside the body.
/// </remarks>
[TestMethod]
[OSCondition(OperatingSystems.Windows)]
[TestCategory("OS-Specific")]
public void Parent_OfUncShareRoot_ReturnsTheShareItself()
{
if (!OperatingSystem.IsWindows())
{
Assert.Inconclusive("UNC paths are Windows-only.");
return;
}

Assert.AreEqual(@"\\server\share", Dir(@"\\server\share\folder").Parent.WeakString);

AbsoluteDirectoryPath share = Dir(@"\\server\share");
Expand Down
13 changes: 4 additions & 9 deletions Semantics.Test/SemanticStringTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1341,14 +1341,9 @@ public void SpanSplitEnumerator_OnlySeparators_HandlesCorrectly()
[TestMethod]
public void ErrorMessages_ContainTypeInformation()
{
try
{
ValidationTestSemanticString.Create("INVALID");
Assert.Fail("Expected ArgumentException");
}
catch (ArgumentException ex)
{
Assert.Contains(nameof(ValidationTestSemanticString), ex.Message);
}
ArgumentException ex = Assert.ThrowsExactly<ArgumentException>(
() => ValidationTestSemanticString.Create("INVALID"));

Assert.Contains(nameof(ValidationTestSemanticString), ex.Message);
}
}
Loading