How to Write Testable Code with Dependency Injection | Swift | Xcode | TDD

Поділитися
Вставка
  • Опубліковано 2 сер 2024
  • This video shows that how can we write testable code using Dependency Injection. What is Inversion of Control, Dependency Injection, how to pass mock data and what changes should we make for writing test cases (without changing anything in the module that we want to test).

КОМЕНТАРІ • 40

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

    No one explained dependency injection with so much clarity. Awesome! 👌🙏

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

    Fantastic, much-simplified explanation of Dependency Injection.

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

    Thank you. I finally understood Dependency Injection.

  • @sumitghosh5792
    @sumitghosh5792 3 роки тому +3

    Pallav I really appreciate your efforts, I follow various iOS resources (paid + free) inorder to keep learning new stuff, the type of content you are creating is amazing and that too for free.

    • @iCode_Happy_Coding
      @iCode_Happy_Coding  3 роки тому +1

      Thanks for the kind words Sumit.
      Glad that you are liking the content. I appreciate your constant support 🙂

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

    Good explanation with a good example. Thank you

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

    Good explanation

  • @puneetpal1466
    @puneetpal1466 3 роки тому +1

    Thanks brother for this awesome video.

  • @ramprasad179
    @ramprasad179 2 роки тому

    Greatly explained Pallav 👍

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

    Thanks Pallav from Brazil!

  • @yogeshbhatt3806
    @yogeshbhatt3806 2 роки тому

    This is amazing Session for Dependency Injection.

  • @aaratipatil3503
    @aaratipatil3503 3 роки тому +1

    Thanks a lot pallav.

  • @richprice5434
    @richprice5434 2 роки тому

    Fantastic explanation

  • @pvj89
    @pvj89 2 роки тому

    thanks for the video its easy to understand and quality is good.

  • @victorriurean
    @victorriurean 2 роки тому

    nice

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

    Your videos are very helpful. I am beginner in writing test cases and currently working on a VIPER swift project. If you can create more videos related to VIPER+DI along with diff test cases.

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

    Hello Pallav I follow your channel more frequently. Why don't you made some video on setup CI/CD with jenkins through Fastlane. Can you do one sample project on this please

  • @Jock3R87
    @Jock3R87 2 роки тому

    Man simply great…. You deserve 👏… all courses and videos so far on UA-cam are fail in front of this… please dont stop guiding us… would like to see Protocol Oriented Programming in real world Xcode project… urge you yo make a video on same.. It UA-cam would have multiple like and subscribe option I would have done it 😀.. where you based man?

    • @iCode_Happy_Coding
      @iCode_Happy_Coding  2 роки тому

      Thanks for the kind words Sagar. I'll try do more videos on Protocol Oriented Programming.
      Thanks for the suggestion 🙂

  • @nirajtiwari8141
    @nirajtiwari8141 2 роки тому

    Thanks Pallav for this short but informative tutorial.
    For JSON decoding testing after API call , would you suggest to test the decoding of actual json from an API kept in TestSuite or is there any other
    preferable way ? Can you make another short video on it if possible ?
    Thank you very much.

  • @aird1893
    @aird1893 2 роки тому

    Thanks man - you are great

    • @iCode_Happy_Coding
      @iCode_Happy_Coding  2 роки тому +1

      Thanks Ali, happy that you found the videos useful 🙂

    • @aird1893
      @aird1893 2 роки тому

      @@iCode_Happy_Coding I am looking forward to more videos.

  • @polu9132
    @polu9132 3 роки тому +1

    Please make a full playlist with protocol orientated programming, Unit Testing in iOS and TDD
    Thanks a lot.

    • @iCode_Happy_Coding
      @iCode_Happy_Coding  3 роки тому

      Sure. I got this suggestion from other viewers too, and I’ll definitely try for making a series of videos covering all these. Thanks for your suggestion and constant support. Appreciate that.🙂

  • @ushadesai6306
    @ushadesai6306 2 роки тому

    Can you extend the example in the video with one more test case of actual payment. Thanks for the video, its very helpful.

  • @obinnaaguwa
    @obinnaaguwa 2 роки тому

    I just started watching your videos recent. You offer really superb content. Is this tutorial having a code base we could use to follow along?

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

      Unfortunately not.
      I'll see that I host the template project/source code for my upcoming videos. Thanks for the suggestion 🙂

  • @radharamana9762
    @radharamana9762 3 роки тому

    Pallav can you pls make a detailed video on protocol-oriented programming. You did that here, it will be nice if you go in deep.

    • @iCode_Happy_Coding
      @iCode_Happy_Coding  3 роки тому +2

      Sure Radha. I’ll think of a use case through which I can explain all the important concepts related to Protocol oriented Programming, and will try to cover it soon. Thanks for the suggestion. 🙂

  • @swathykrishnan5566
    @swathykrishnan5566 3 роки тому

    Thanks for this session. Can you take a lecture on gRPC and protocol buffers in iOS ?

    • @iCode_Happy_Coding
      @iCode_Happy_Coding  3 роки тому

      That’s a good suggestion Swathy. I’ll try covering it.
      Thanks 🙂

  • @golukumar-ru2sw
    @golukumar-ru2sw 3 роки тому +1

    Your are creating amazing content. I need some help to improve my code. Can you please provide me a simple demo project with proper mvvm architecture. It will be great help thanks

    • @iCode_Happy_Coding
      @iCode_Happy_Coding  3 роки тому +2

      As of now, I don’t have any demo project using MVVM. But it’s a nice suggestion and I’ll try covering it in one of the videos. The project that I’ll create for that video, I’ll share that on GitHub.
      Thanks for suggesting this 🙂

  • @tenkilograms
    @tenkilograms 3 роки тому

    Thanks brother.. can you make a video of writing a network layer using combine, URLSession for POST and GET in swift?

    • @iCode_Happy_Coding
      @iCode_Happy_Coding  3 роки тому

      Sure Abhi, I’ll try covering that. Thanks for the suggestion🙂

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

    Hi can you share the code link for this please

  • @solar679
    @solar679 2 роки тому

    Hi is this code available ?