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

Remove FluentAssertions dependency and standardize on xUnit assertions #3015

Open
Muhammad-awawdi-amazon opened this issue Jan 27, 2025 · 4 comments
Labels
C# C# wrapper dependency Dependency management
Milestone

Comments

@Muhammad-awawdi-amazon
Copy link
Collaborator

Background

Due to recent license changes in FluentAssertions (see fluentassertions/fluentassertions#2956 and Fluent Assertions Releases), it's prudent to remove this dependency from our project. While there's no immediate danger, this change will prevent potential future restrictions on our users.

Current Usage

FluentAssertions is currently used in a few places in our test code. For example:

_ = (await client.SetAsync(key, value))
    .Should()
    .Be("OK");
_ = (await client.GetAsync(key))
    .Should()
    .Be(value);

Proposed Changes

Remove the FluentAssertions dependency from the project.
Replace all FluentAssertions assertions with standard xUnit assertions.
Update the files to remove the FluentAssertions package reference.

Example of Changes

Assert.Equal("OK", await client.SetAsync(key, value));
Assert.Equal(value, await client.GetAsync(key));

The plan to update to xUnit v3. This will involve reviewing our assertion usage and potentially taking advantage of new xUnit features.
Consider creating a project-wide guideline for managing test dependencies and assertion styles to ensure consistency across all files.

@Muhammad-awawdi-amazon
Copy link
Collaborator Author

@Sa1Gur

@Yury-Fridlyand
Copy link
Collaborator

Fixed by #3013

@Muhammad-awawdi-amazon
Copy link
Collaborator Author

@Yury-Fridlyand I dont think its completed yet, check has to be done for the rest of the wrappers, and as @Sa1Gur mentioned, he will update to xUnit v3

@Yury-Fridlyand
Copy link
Collaborator

Oh, excuse me my misunderstanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C# C# wrapper dependency Dependency management
Projects
None yet
Development

No branches or pull requests

2 participants