Skip to content
Merged
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
Next Next commit
test: add additional constructor tests for PathX
Signed-off-by: Kenny Pflug <[email protected]>
  • Loading branch information
feO2x committed Aug 17, 2025
commit f61b23dbcf6da81d35883540f8654bc3b3a4f4d7
24 changes: 24 additions & 0 deletions tests/Light.ExtendedPath.Tests/PathXConstructorTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using FluentAssertions;
using Xunit;

namespace Light.ExtendedPath;

public static class PathXConstructorTests
{
public static readonly TheoryData<PathXOptions> PathXOptionsValidCases =
[PathXOptions.Windows, PathXOptions.Unix, PathXOptions.WindowsUncPaths];

[Fact]
public static void Constructor_ShouldThrow_WhenOptionsArgumentIsNull()
{
var act = () => new PathX(null!);

act.Should().Throw<ArgumentNullException>().WithParameterName("options");
}

[Theory]
[MemberData(nameof(PathXOptionsValidCases))]
public static void Constructor_ShouldAssignOptions_WhenOptionsArgumentIsValid(PathXOptions options) =>
new PathX(options).Options.Should().BeSameAs(options);
}