Integration Test: Mock PartOf a class

Поделиться
HTML-код
  • Опубликовано: 27 янв 2025

Комментарии • 4

  • @حسینمحسنی-ب7ق
    @حسینمحسنی-ب7ق 5 месяцев назад

    ❤❤❤

    • @sa-es-ir
      @sa-es-ir  5 месяцев назад

      Thanks ❣️

  • @Learning_with_m
    @Learning_with_m 5 месяцев назад

    Hi Saeed jan,
    Thanks for sharing your thoughts.
    What do you think about creating a separate class for calling the API, along with a related interface, and then injecting it into the main class? This way, we could test our code without worrying about unrelated concerns.

    • @sa-es-ir
      @sa-es-ir  5 месяцев назад

      Thanks Masoud jan, actually that's a great idea!
      So by having a separate interface let's call it IGithubUserService and then mock the interface?
      I think that would be better and more efficient!