Giter Site home page Giter Site logo

NUnit 3.x support about fsunit HOT 14 CLOSED

fsprojects avatar fsprojects commented on May 23, 2024
NUnit 3.x support

from fsunit.

Comments (14)

sergey-tihon avatar sergey-tihon commented on May 23, 2024

Yes, we need FAKE support of NUnit3 first
fsprojects/FAKE#1010

from fsunit.

sergey-tihon avatar sergey-tihon commented on May 23, 2024

So, probably it is time to try to support of NUnit 3 fsprojects/FAKE#1064

from fsunit.

sergey-tihon avatar sergey-tihon commented on May 23, 2024

@et1975 do you have experience of writing custom constrains for NUnit3?

from fsunit.

et1975 avatar et1975 commented on May 23, 2024

I wanted to take a look at v3 anyways, might as well port this.

from fsunit.

sergey-tihon avatar sergey-tihon commented on May 23, 2024

Thank you @et1975

from fsunit.

et1975 avatar et1975 commented on May 23, 2024

Once nunit/nunit#1196 is resolved the changes in et1975/FsUnit/equals branch should do it.

from fsunit.

rprouse avatar rprouse commented on May 23, 2024

The NUnit team is working on custom message formatters based on the issue nunit/nunit#1196 and original PR by @et1975. @CharliePoole has create PR nunit/nunit#1222

This fix is intended for you, so we would appreciate a code review to see if it meets your needs.

Once it is merged, if you need to test using the NuGet packages produced by our continuous build, I can point you to them.

@sergey-tihon what do you need custom constraints for? They are fairly easy to write. If you need help, please reach out.

from fsunit.

CharliePoole avatar CharliePoole commented on May 23, 2024

Here's another question about our (NUnit's) support for F#.

Can anybody think of a way to add a feature to the NUnit framework, so that it is only accessible to F#. Resolving nunit/nunit#1196 with a static global is cool for F# users, who will access it in a top-level module, rather than from a test. It's a bit more dangerous in C# (not to mention VB) where calling it from within a test is the most natural way to do it. Adding a new formatter inside a test using the a static method creates a nasty side-effect.

Maybe we need a separate module per language on top of the framework, but that's a very busy solution. Which is what leads to the question: how to give something to F# users without giving it to other users?

from fsunit.

sergey-tihon avatar sergey-tihon commented on May 23, 2024

@rprouse
Would be nice to test in once it is merged. Appreciate if you point me to you nightly packages.
There are only two custom constrains in current codebase:

Choice<int, string>.Choice1Of2(42) |> should be (choice 1)

@CharliePoole I think that the reason why @et1975 did not want to do it in OneTimeSetUp is that we can do it once per assembly with static method.
Users of FsUnit can get it for free because it will be in FsUnit.dll and that is enough.

from fsunit.

CharliePoole avatar CharliePoole commented on May 23, 2024

@sergey-tihon It sounds like F# users are likely to be satisfied by this. My concern is that we are exposing the feature to all users and those working in other languages who use this in the most "obvious" way will be unexpectedly impacting global state. That is, such users are likely to call the method in a setup or onetimesetup. They will expect the custom format to go away when the scope of the setup terminates but that won't happen.

In fact F# users could fall into the same trap but probably won't because they have an easier way to use the feature.

I'll keep playing with this and let you know when there is something relatively final to test.

from fsunit.

rprouse avatar rprouse commented on May 23, 2024

@sergey-tihon the NuGet feed is at https://ci.appveyor.com/nuget/nunit

Currently you need to figure out which build a fix is in by looking at the AppVeyor builds and getting the build number. Less than ideal. We plan to fix it, but haven't yet. Remind me once the PR is merged and I will get you a package version that will work for you.

I assume that the custom formatter will solve your need for the EqualsConstraint and open up more of our constraints for your use. Looking at ChoiceConstraint, it looks like it should just work, although my F# foo is not strong 😄

from fsunit.

rprouse avatar rprouse commented on May 23, 2024

@sergey-tihon if you wanted to test with the NuGet package of the current PR, the latest version is 3.1.0-CI-2072

from fsunit.

CharliePoole avatar CharliePoole commented on May 23, 2024

@sergey-tihon Note however that the current PR is marked Do Not Merge because it is still in development. The calling sequence could change.

from fsunit.

sergey-tihon avatar sergey-tihon commented on May 23, 2024

Support of NUnit 3 released in FsUnit 2.0.0
Let's tack support of NUnit v3.2 in separate issue - #86

from fsunit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.