Unit Testing: MOQ Framework

preview_player
Показать описание
This is the third of a four part series where Robert is joined by Phil Japikse to discuss unit testing. This series expands on the 2017 Unit Testing episode. In this episode, Robert and Phil cover the Moq framework. Mocking provides the ability to simulate an object. For example, you can test a call to a database without having to actually talk to it. The Moq framework is an open source unit testing framework that works very well with .NET code and Phil shows us how to use it.

Links:

Episodes in this series:
1. Test Driven and Scenario Based Testing
2. xUnit
3. Moq Framework (this episode)
4 .Existing Code
Рекомендации по теме
Комментарии
Автор

This moqing framework is so complex that I might have to test my test code itself...

akab
Автор

Too bad the previous episodes aren't links! Makes is much harder that it needs to be to view other episodes. Sometimes you start to wonder if people that create YouTube videos every use YouTube themselves..

FastMellow
Автор

This was indeed a lot of drinking from the fire hose.

PedroSousa-npwp
Автор

Lazy presentation :P. Manager, Presenter both look sleepy

kbinoyn
Автор

Thanks for this. This is really good.

ronsmith
Автор

0:27 "And today... Mock You!"

MrBabumba
Автор

Here's something I don't really understand with MOQ, If you faking the svc calls, and the data in and data out.. how can you guarantee that the svc or method is working as expected?

mamyname
Автор

Just got into using Moq rather than copying and modifying (apis- nearly all the same) this very last week. And have to say it looks worse than it is once you dig in. So, just use it!

GaryJohnWalker
Автор

You seem to skip over how to test File IO, I thought you mentioned it in the xUnit video. It seam you can only get files in the bin Directory. what about running on build servers?

StephanMiske
Автор

a few beers later? :P Interesting topic non the less

TheSecuror
Автор

dudes knew it was crashing server and didn't realize getting all customers was an issue lol, and costmers are required to query products?.. sounds like REALLY bad logic or table design lol

auchucknorris