home.social

#xunit — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #xunit, aggregated by home.social.

  1. @bradwilson I saw your issue about #JetBrainsRider not supporting @xunit v3 with Microsoft.Testing.Platfrom v2

    With #dotnet 10 how would a minimal project using MTP v2 and #xunit v3 look like now.

    Like this?

    github.com/bitbonk/rider-mtp-v

    Or do I still need the xunit.v3.mtp-v2 package or even the bool msbuild properties
    TestingPlatformDotnetTestSupport or UseMicrosoftTestingPlatformRunner

  2. xUnit Test Patterns: Contract Test — zalas.pl/contract-test/

    Contract Tests are examples that describe the behaviour of an abstraction by expressing what cannot be encoded in the type system. These are typically helpful in testing adapters as defined in the Ports & Adapters architecture.

    Examples in #kotlin, but the pattern is universal.

    #contracttests #xunit #testing #hexagonal #portsandadapters

  3. Искусство Unit-тестирования: Сокращаем Arrange до Нуля

    Unit-тесты очень важно и нужно писать, но вот незадача — на них никогда не хватает времени! Прочитав эту статью, вы узнаете абсолютно новый способ их написания, который сэкономит кучу времени и нервов. Эта статья будет полезна .NET разработчикам, которые когда-либо сталкивались с написанием unit тестов, а также тим и техлидам в поиске оптимальной практики для своей команды.

    habr.com/ru/companies/ruvds/ar

    #unit_tests #csharp #dotnet #autofixture #xunit #autodata #ruvds_статьи

  4. With #testcontainers, you can spin up and tear down #Docker containers in your tests.

    If you need a database, you don’t need to mock it: your #xUnit, #NUnit, and #MSTest code can launch an actual database!

    Learn more in this blog post by @khalidabuhakmeh: jb.gg/ua9vjg

    #dotnet

  5. @bradwilson @xunit A right, I forgot about that one. I have been an avid #FluentAssertions user since ages, so my knowledge about the #xUnit assertion landscape is a bit rusty.

  6. Okay, I'm pretty happy with #xunit and #fluentassertions.

    Check out this test: github.com/wadewegner/wordle-s

    First, I'm pleased with my cleverness when constructing a set of shorthand for building guesses to evaluate the responses.

    Second, I love the syntax of FluentAssertions.

  7. @WadeWegner I've read a lot about (IIRC it's from the same dev that made ). It's a lot simpler to setup, but lacks some features that they feel promotes bad practices. I use NUnit at work with no complaints, but I've been using xUnit for my OSS projects since there's less ceremony (setups are constructors and teardowns are handled by implementing IDisposable)