-
Notifications
You must be signed in to change notification settings - Fork 8
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
Adding PropertyAttribute for XUnit #47
Adding PropertyAttribute for XUnit #47
Conversation
Great work 👍
|
Personally I'm not interested in this feature; firstly, I find Expecto much more compelling than XUnit; secondly, I like the explicitness of "vanilla" Hedgehog; and thirdly, I have very limited resources for further OSS project support. And as @moodmosaic says, I'm not sure this belongs in the Hedgehog.Experimental repo. Perhaps this could be a separate repo under the |
Eventually it could be. If it's of high quality and popular at the same time (e.g. haskell-hedgehog-classes started under chessai's own github and later on we moved it inside the org). |
Sure. The point being, perhaps this belongs in a separate repo (not just package) and not in Hedgehog.Experimental. |
My preferred test runner (NCrunch) doesn't support Expecto, so I'm sticking with Xunit for now. I'll close this as I agree it doesn't belong in |
From Expecto's README
We want people to use Hedgehog instead! ;) |
Yep, basically we'd need both. |
Can you elaborate on that? Are you saying that there is something about QuickCheck/FsCheck that his technically superior to Hedgehog? |
I apologize if I wasn't clear. I meant it's nice to have both Hedgehog.Xunit and Hedgehog.Expecto. Both would rely on Hedgehog.Experimental.GenX.auto out of the box, with the option to override custom types. |
The code in this PR is available from nuget.org via the package |
🚀 |
Inspired by FsCheck's PropertyAttribute, I implemented one for Hedgehog. It currently uses
GenX.auto
to generate data for methods with the[<Property>]
attribute, then checks the method viaProperty.check
.Currently a draft, but everything works. Next, I'm going to add a way to inject a custom
AutoGenConfig
. I'll likely copy/paste what FsCheck does.Related prior discussion: hedgehogqa/fsharp-hedgehog#144