Загрузка...

Different testing tools may require code to be designed in certain ways.

While I don't like having to change my design philosophy just to support a testing tool, it's worth asking if it's a good tradeoff.

In the case of bUnit for Blazor, I found there's an expectation around having public mutable properties to control things from your tests. This isn't really a thing I like to have, personally.

I found my two immediate options were:
- Move to something like MVC or MVVM to get a view model extracted, minimizing the surface area for mutability
- ... Or just suck it up and go with the mutable property approach :)

Trying to prevent mutation in these situations may not be a huge benefit. Still early in my Blazor journey though.

Are you building Blazor apps?

Watch the full video here:
https://youtu.be/EXFHM5wonlM

----
📨 Sign up for my FREE email newsletter:
https://subscribe.devleader.ca
🗣️ Share with your network!

#Blazor #DotNet #CSharp #Testing

Видео Different testing tools may require code to be designed in certain ways. канала Dev Leader
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять