Unit Testing in C# 2022: 4. Mocking EXPLAINED SIMPLY [FakeItEasy]

Поділитися
Вставка
  • Опубліковано 9 кві 2022
  • Unit Testing in C# 2022: 4. Mocking EXPLAIND SIMPLY [FakeItEasy]
    C# Developer Discord Server here: / discord
    Linkedin: / teddy-smith-015ba61a3
    Portfolio: www.teddysmithdev.com
    Github: github.com/teddysmithdev
  • Навчання та стиль

КОМЕНТАРІ • 24

  • @seanh2409
    @seanh2409 Рік тому +10

    A fairly good video on intro to Mock, a little all over the place occasionally, but it is well explained. Slowing down a little to hit those dependencies early and type less could be beneficial to the overall delivery, though ;).
    Big takeaway, is, Mock replaces data access execution with "Mock" data and listens for these calls to replace the execution and return expected data.

  • @ramsameer1636
    @ramsameer1636 Рік тому +2

    gone through every miniute very very nice explanation thanks for the content

  • @yumyum7196
    @yumyum7196 11 місяців тому

    Great video. The bottom taskbar was tripping me because it's almost identical to mine.

  • @Tibiafy
    @Tibiafy Рік тому +3

    Thx for the video! I'll use Moq cause almost all companies use it, but it realy doesn't make a difference! Few things change as I could see!

  • @eastsidemusic85
    @eastsidemusic85 Місяць тому

    wish I had teachers like you maan. respect

  • @Furki4_4
    @Furki4_4 Рік тому +2

    the most meticulous unit test videos on yt ever ! thank you

  • @emeraldbadmintonfun
    @emeraldbadmintonfun Рік тому

    how to get value from the app.config that we create in project , i'm always get null return in the unit test. even though already copy the app.config in the unit test

  • @IndianGermanDiaries
    @IndianGermanDiaries Рік тому +2

    "I hope I blew your mind" Really Man ! :)

  • @emale003
    @emale003 2 роки тому +2

    Thanks for these videos. I’ve recently got a job on a dev that said they’d be using testing scripts. So, I’m trying to get a little familiar. I have an unrelated question: what kind of chair do you use? From my understanding, I’ll be mostly remote and my mesh chair isn’t working for me anymore and looks like yours is something closer to what I’m looking for.

    • @TeddySmithDev
      @TeddySmithDev  2 роки тому +2

      Wellness By Design. I’ve had it for like 5 years and it’s lasted forever.

  • @murtazotoshniyozov4688
    @murtazotoshniyozov4688 3 місяці тому

    Amazing

  • @Mo-ef9yt
    @Mo-ef9yt 3 місяці тому

    Nice video 👍

  • @shivamshrivastav959
    @shivamshrivastav959 2 роки тому +4

    I have been working as a dev (recently started) . I started with unit testing , but got stuck at mocking concept and fake it easy, am unable to write further. can you help me with that ?? gmail?

    • @TeddySmithDev
      @TeddySmithDev  2 роки тому +2

      Post questions in discord and me or other developer will help you

  • @rebinmod
    @rebinmod 10 місяців тому

    The Mock Object dose not have the real Implementation of DNS . We just define the expected behavior of the external service.

  • @jephrennaicker4584
    @jephrennaicker4584 11 місяців тому +1

    A mock?...wait.....oh Dam, a Mock!🤣

  • @retagainez
    @retagainez 2 місяці тому

    Wouldn't your example be simplified by just making it a test stub? I understand that you might need to expand out functionality to mimic more behavior from a DNS dependency... but you usually don't take such big steps immediately, so that's why I'm suggesting a much simpler approach of just making a stub. Mock not really necessary for this single test case, which is typically how a test suite is written and a test case started. One at a time.
    I think Mocks typically represent an external dependency which might depend on the inputs from the system under test and makes assertions based on those.

  • @user-nj7of5yi4b
    @user-nj7of5yi4b 4 місяці тому

    thanks

  • @abidshaik9614
    @abidshaik9614 11 місяців тому +1

    Where in North Carolina ?? haha Another dude in NC watching Unit testing videos from another dude in NC lol

    • @TeddySmithDev
      @TeddySmithDev  11 місяців тому

      Charlotte. I could throw a rock and hit panther stadium.