Autofixture: F# Specific library

Created on 16 Jun 2020  ·  4Comments  ·  Source: AutoFixture/AutoFixture

Hello, my team and I have been working with F# for some time now, and have used AutoFixture in the past with C# with a lot of success. We wanted to use it for testing our F# code, but ran into issues with F#-specific types such as Discriminated Unions and F# Lists. I was able to come up with a customizer to get it to work with all of the F# types we have tried with, as well as with XUnit AutoData atributes for theory tests.

It was very simple in terms of implementation, but since I could see this being a common need of anyone wanting to use AutoFixture with F#, I was wondering if the AutoFixture team saw value in publishing an official package that handled F# use cases like this. I'm more than happy to submit a PR, but I figured I'd ask here first to see if it's something you would be willing to have here.

question

All 4 comments

Hello @josh-degraw!
I think your proposition sounds interesting. If you feel like other people in the community could get immediate benefits from such a library, you could publish it on NuGet under the AutoFixture.Extensions. name prefix.
In the meantime you could make a PR to start the discussions around the changes you propose.
I have to warn you though I have only started to learn F#. Hopefully other maintainers will join the review on your PR.

Okay. I tried publishing it under AutoFixture.Extensions.FSharp and AutoFixture.Extensions.FSharp.Xunit, but it said that the name prefix was reserved and to request access to upload to the namespace.

There was a miscommunication in the middle here.
I just checked the nuget.org to confirm the reserved prefix and it actually is AutoFixture.Community.*.
The AutoFixture.Extensions.* prefix has been taken before the reserved prefixes have become a feature.
I'm sorry for the inconvenience.

@josh-degraw I can see that you have published the library to NuGet.

I'm going to close this issue. Feel free to reopen it if you have more questions.

Was this page helpful?
0 / 5 - 0 ratings