C# Unit Testing Tutorial

preview_player
Показать описание
Why write tests? What are the benefits of testing? What to test? How to relay importance of testing? How to write more testable code? Today we answer these questions and take a look at some examples trying to shift our mindset in how we approach testing our code, as well as highlighting problematic code that can cause us pain in the future.

👉 Try Rider
RD5K9-4TXXW-KMV3G-NYWSF-3ZSTP

Timestamps
00:00 Testing FAQ
13:24 Unit Testing Examples

#csharp #testing
Рекомендации по теме
Комментарии
Автор

Would you recommend talking about unit tests on a first date?

ivanvincent
Автор

Can I just say I have only just started watching your videos and I really wish I found your channel earlier, your articulation of these topics is just so well versed at every layer of abstraction. Where you're able to simply descibe what the tooling involves, the utility of it for engineers to the actual use for business strategy itself. I can't thank you enough for investing the time to make these wonderful videos.

laurenceqi
Автор

10 minutes, already the best video on testing i've seen!

comoan
Автор

Great stuff!! love the flow; thinking about unit tests from the standpoint of a client really paints the picture!

jt
Автор

Clear and practical explanation, thanks for this video!!!

aznn
Автор

Really nice advice all around, really quality content

rafaelurrea
Автор

You are incredible, I really love your videos and they helped me a lot. Thanks <3

ariafathi
Автор

Thanks a lot for the great videos!, Your videos are awesome !!

mohammedibrahim
Автор

since when you can just inherit from any class, doesn't have to be abstract does it ?

funfactor
Автор

poster back there. by the way nice tut thanks ;)

rouzbehzarandi
Автор

@
Raw Coding Thanks for your great video, Please record a separate video for integration testing and E2E testing also. Could you introduce me, some good resources for testing?

mehdihadeli
Автор

Nice! Thanks for the video and explanations. subscribes++;
I would like to mention(discuss?) one thing you said about TDD while testing Hashing.
If it was only about hashing a string then we could make use of TDD *very* easily, by checking a sha256 of string "AABB" online, and use that result in the test assertions.

In this example too, in `arrange` section, we can build an `Item` in such a way that its #content + #url will be "AABB" eventually, and do the same thing I wrote before. But then our tests will be coupled to the implementation, because you may iterate over selectors in reverse order(just an example), and then hashed string would become "BBAA", and tests would fail.
So, maybe it's design related problem? Hashing shouldn't go over the selectors at all? It should *only* accept a string(or array of bytes) and make a hash out of it?
If we decoupled the the Hashing and Stringifier* logic, then we could make a better unit test for both.
I think this way, because when something can't be done with TDD, it's mostly because of design decisions(problems)

davudsafarli
Автор

What are you using to show markdown files in Rider?

crusaderACR
Автор

Hey! Your videos are awesome and can you please make tutorials for pheonix- live views ? If possible.... Thanks

deepak
Автор

By the way what is this environment where you are coding?

rade
Автор

Really difficult to see the code when watched on phone

kimsung