How to Write Readable Tests (7 SIMPLE TIPS!)

Поділитися
Вставка
  • Опубліковано 16 жов 2024

КОМЕНТАРІ • 4

  • @julianomontini2263
    @julianomontini2263 4 місяці тому +1

    Started to watch your videos recently. Can't stress how happy I'm to have found them, because I swear that 99% of the videos out there that mentions tests and TDD only apply it to a calculator or to a fizzbuzz function. It's so important to show these concepts in the context of a real application. Congratulations on the great content!

    • @gui.ferreira
      @gui.ferreira  4 місяці тому

      Thank you, Juliano! That comment means a lot.
      Testing and TDD aren't attractive topics, that bring a lot of views. I think that leads to poor content about the topic.

  • @xaberue
    @xaberue 4 місяці тому +1

    Great tips!! Something that I also do in my tests is a set of MockHelpers where I create the repetitive stuff for my test cases using extension methods as well.
    BTW, perhaps my opinion would be a bit impopular here, but, Ii it really a game changer to use fluent assertions? I've use both but, I fell really comfortable also doing classic assertions.
    Thank you very much as always for sharing these tips Gui!!!

    • @gui.ferreira
      @gui.ferreira  4 місяці тому +1

      Give it a try! For some cases such as working with dates, Fluent Assertions is quite handy. Besides that, it massively improves readability