Make API calls in Flutter using TDD approach

preview_player
Показать описание
This video demonstrates how to use a Test Driven approach to write API calls in Flutter.
This is my first video on YouTube. Suggestions are always welcomed so that I improve my next content!
#tdd #flutter #codePhilosophy
Рекомендации по теме
Комментарии
Автор

I think you forgot to check the expectation on the test

expect(users.first.name, “any name”);

If you did not set the expectation your test always passed even the function did not behave as you want.

And better not call the real networking service on the test because you cannot control the backend and it can make your test fail (ex: you don’t have an internet connection, the server down, sometimes it return 1 object another day it will return 2 objects, etc). You can call test doubles like stub or spy.

Anyway, keep the good work, I enjoy your video. Good luck 😊

solihinchiko
Автор

Excellent video. You make it look so simple. Thanks

PeterAlderton
Автор

Excellent sir make more videos on flutter

avipatel
Автор

_helloWaleed <3
Good Luck and Thank you for the video :)

mhmzdev
join shbcf.ru