“How do you think when writing tests?” - It’s simpler than you may think

Поділитися
Вставка
  • Опубліковано 27 жов 2024

КОМЕНТАРІ • 12

  • @TheDahser
    @TheDahser 6 років тому +5

    The only bad thing about your videos is that they don't come out soon enough! Would love to see test examples with Reactive libraries like RxSwift too! :) I feel like they are much harder to test compared to basic swift code.

  • @glebcherkashyn2357
    @glebcherkashyn2357 6 років тому +3

    Guys, thank you so much for this video! Watching it I felt like you were reading my minds, really. You've described all my problems and mistakes, especially attempts to write half a project after first primitive test 😂 Another portion of motivation :)

  • @tityseptiani8584
    @tityseptiani8584 6 років тому +1

    Just when I was beginning to use TDD on a project, this video came out. It actually helps me clear out some confusing thoughts. The beginner kind of thoughts where I am confused of what to test and how much is the minimum code I should write to pass the test.
    And maybe this is out of the topic but, I have been looking for a robust way to write a testable networking layer. And I am always confused about when and when not to use singletons. If you can answer these questions, I will be really grateful. Thank you for the video!

    • @EssentialDeveloper
      @EssentialDeveloper  6 років тому

      Hey Tity, we're glad the video helped you. We'll cover `Singleton` questions in the future. Stay tuned!

  • @ciantim2996
    @ciantim2996 4 роки тому

    Can you guys make a video about breaking down a problem to smaller problems, please

  • @gavno007
    @gavno007 6 років тому

    Hey, sorry for off top I wonder in VIPER can I pass a date model to VC or I should convert it in text representation in Presenter and pass simple string to VC, ty in advance!)

    • @EssentialDeveloper
      @EssentialDeveloper  6 років тому

      Hey, we recommend you to convert the Date into a String (a *presentable* version of the date) in the Presenter. ✅⛩

  • @PS-dp8yg
    @PS-dp8yg 5 років тому

    My biggist problem is that I keep all my uiviews private when building views programmatically, so as a result, I cannot test the label in this case. I'm guessing if I leave the views public and use the "let" keyword to make them immutable to change...would that be a better solution?

    • @EssentialDeveloper
      @EssentialDeveloper  5 років тому +4

      Yes, a `public` or `internal` `let` would do just fine.
      You can also keep it as `var` if needed, and make the setter `private`:
      `private(set) var myLabel: UILabel`.
      This way, you have an `internal getter` and a `private setter`! ✅

    • @PS-dp8yg
      @PS-dp8yg 5 років тому

      @@EssentialDeveloper Thank you!

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

    Caio how to write unit test void function.?

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

      Hi Dipesh! Functions that return Void have side-effects. Arrange the scenario, Call the function, and Check the side-effects ✅