YarnSpinnerTool / YarnSpinner

Yarn Spinner is a tool for building interactive dialogue in games!
https://yarnspinner.dev
MIT License
2.3k stars 201 forks source link

Migrate unit tests to Fluent Assertions #342

Closed desplesda closed 1 year ago

desplesda commented 1 year ago

This PR migrates all tests to Fluent Assertions.

Currently, all assertions use the built-in Assert.Thing API that comes with xUnit.

With this change, all assertions in all unit tests have been migrated to Fluent Assertions. A dependency on Fluent Assertions has also been added to YarnSpinner.Tests.csproj.

By migrating to Fluent Assertions, our unit tests gain access to a richer and more expressive API for specifying the behaviour of our assertions, and have much better error messages when an assertion fails.

This PR makes no user-facing changes, and only affects unit tests. All existing Assert.X assertions have been replaced one-for-one with their Fluent Assertions counterpart.