Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin or remove fluentassertions #32

Open
SebastienDegodez opened this issue Jan 15, 2025 · 3 comments · May be fixed by #33
Open

Pin or remove fluentassertions #32

SebastienDegodez opened this issue Jan 15, 2025 · 3 comments · May be fixed by #33
Assignees
Labels
dependencies Pull requests that update a dependency file kind/enhancement Enhancement of existing feature

Comments

@SebastienDegodez
Copy link
Member

Reason/Context

FluentAssertions (v8+) is changing license to become paid software for commercial use.

More details here

Description

Immediate solution without breaking:
Pin the NuGet version on the csproj
To achieve that we must surround the version number with []

Example:

<PackageVersion Include="FluentAssertions" Version="[7.0.0]" />

Implementation ideas

  • Stay with v7 indefinitely
  • Switch to alternative libs (shoudly?)
  • Switch to builtin assert
@SebastienDegodez SebastienDegodez added the kind/enhancement Enhancement of existing feature label Jan 15, 2025
@SebastienDegodez
Copy link
Member Author

@lbroudoux more information to take decision : fluentassertions/fluentassertions#2943

@lbroudoux
Copy link
Member

Thanks for pointing this one out. This is a critical topic.

From what I've read on the thread you mentioned, moving to v8 is not an option regarding the CNCF licensing policy. Sticking to v7 is not a mid/long-term option - we must just be sure we freeze to v7 the time we find a new alternative in a short term (no rush though).

We can either move to an alternative of the switch to built-in assertion - I have no real opinion on that as I can evaluate the required effort. We also should keep an eye on the project as a fork of fluentassertions v7 may also be launched if some maintainers are aligned with the project perspective ...

@lbroudoux lbroudoux added the dependencies Pull requests that update a dependency file label Jan 16, 2025
@SebastienDegodez
Copy link
Member Author

I use FluentAssertion reflexively, the added value is debatable.

It's easy :) , some samples:

Fluent Assertion XUnit Notes
"microcks".Should().Be("microcks") Assert.Equal("microcks", "microcks") Or StrictEqual
"microcks".Should().NotBe("microcks") Assert.NotEqual("microcks", "microcks") Or NotStrictEqual
"microcks".Should().BeEquivalentTo("microcks") Assert.Equivalent("microcks", "microcks")
Microcks.Should().NotBeNull() Assert.NotNull(Microcks)
Microcks.Should().BeNull() Assert.Null(Microcks)
Microcks.Should().BeEmpty() Assert.Empty(Microcks)
Microcks.Should().BeNotBeEmpty() Assert.NotEmpty(Microcks)

@SebastienDegodez SebastienDegodez self-assigned this Jan 18, 2025
SebastienDegodez added a commit that referenced this issue Jan 18, 2025
- Updated all test methods to use Xunit's Assert class
- Removed package dependency
resolves #32

Signed-off-by: SebastienDegodez <[email protected]>
@SebastienDegodez SebastienDegodez linked a pull request Jan 18, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file kind/enhancement Enhancement of existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants