Hey, thank you for the video series. Next time though could you please provide a link to the code you're working with at the time. Your repo has changed massively since you posted this video. Some changes I could work around but the detail function not even being present was an awkward one.
Yeah in the future will def not change code base like I did. For anyone watching, you can go back into history and view code after different commit spots. I can imagine it helps with learning process too because you have to dig into code lol!
I appreciate your effort into making this series. Although, it feels like you don't fully understand what you are doing and what you are talking. You repeated that you don't even understand how some things works - "it's just like that,". If you don't understand, then we will not understand either.. You also tend to not follow your own doing, which makes your explanations a bit tangled. Anyway I thank you for your time you put into this material, it wasn't that bad either but rather helpful.
I get the overall (thousand foot) concept of mocking, but then the code doesn't make sense. Example, lines 39 and 40 seems like two separate things from lines 42 and 44. (I'll keep learning...thanks!)
Hey Teddy. Great tutorial, but quick question. Why is it when I run my test, with the test and controller view set up the same way (view is IActionResult), I get an error stating that the test expects result to be of type ViewResult?
@@TeddySmithDev that's what I did, but I didn't know why my action result page function that returns a View, set up the same as yours, would fail the test. Another test ran on an edit page that returned a list of model instead of one passed with the action result type check. Didn't seem to make sense
Hello Teddy, we would like to see a crud in modal example written with IViewEngine, ViewEngineResult razor syntax and javascript ajax etc when you have time because there is not enough examples about it thank you for your tutorials.
I might be wrong, but I feel like it's easier to understand the faking if we talk in terms of Test Driven Dev.... then it makes more sense to think about "oh, we have a fake IEnum here.... oh yeah, it's because the real functionality I need to write has to do that.
The best tutorial I found about unit test!! Thank you
Thanks for watching!
Your tutorial is amazing, thanks teddy
Thank you Teddy
Why we use mock objects?
It's faster . It gives us consistent results ,It helps to isolate the unit under test.
Hey, thank you for the video series. Next time though could you please provide a link to the code you're working with at the time. Your repo has changed massively since you posted this video. Some changes I could work around but the detail function not even being present was an awkward one.
Yeah in the future will def not change code base like I did. For anyone watching, you can go back into history and view code after different commit spots. I can imagine it helps with learning process too because you have to dig into code lol!
@@TeddySmithDev yeah this is true, definitely had to think!
I appreciate your effort into making this series.
Although, it feels like you don't fully understand what you are doing and what you are talking. You repeated that you don't even understand how some things works - "it's just like that,". If you don't understand, then we will not understand either.. You also tend to not follow your own doing, which makes your explanations a bit tangled.
Anyway I thank you for your time you put into this material, it wasn't that bad either but rather helpful.
Hi Teddy .
fakeiteasy dose not allow faking a class.
I want to mock a class and access a public property of it. What should I do?
The async method returns a Task why is it a Fake instead of Fake that you create (the same thing for the IEnumerable instead of Task? thank you
I get the overall (thousand foot) concept of mocking, but then the code doesn't make sense. Example, lines 39 and 40 seems like two separate things from lines 42 and 44. (I'll keep learning...thanks!)
Hey Teddy. Great tutorial, but quick question. Why is it when I run my test, with the test and controller view set up the same way (view is IActionResult), I get an error stating that the test expects result to be of type ViewResult?
switch of BeOfType to ViewResult instead of IActionResult
@@TeddySmithDev that's what I did, but I didn't know why my action result page function that returns a View, set up the same as yours, would fail the test. Another test ran on an edit page that returned a list of model instead of one passed with the action result type check. Didn't seem to make sense
Hi Ted, thanks for the video. I do have a question regarding faking Repositories that have dependencies as well. How would that work?
When you fake them, the dependencies aren’t real. Basically a fake object is created and replaces when tests run.
Hello Teddy, we would like to see a crud in modal example written with IViewEngine, ViewEngineResult razor syntax and javascript ajax etc when you have time because there is not enough examples about it thank you for your tutorials.
Eventually I will release a Razor page tutorial but that's a long ways off
Hello tedy very good
I might be wrong, but I feel like it's easier to understand the faking if we talk in terms of Test Driven Dev.... then it makes more sense to think about "oh, we have a fake IEnum here.... oh yeah, it's because the real functionality I need to write has to do that.
love from nepal
thanks
Hey Teddy from the future.... where is Bill ?
well