Design Patterns for Unit Testing - Builder Pattern

Поділитися
Вставка
  • Опубліковано 1 січ 2025

КОМЕНТАРІ • 42

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

    ❤️ Consider supporting this channel by becoming a Patron: www.patreon.com/infalliblecode

  • @simon.in.motion
    @simon.in.motion 5 років тому +22

    You have really improved your video quality in every way :) these intros are awesome, keep going man ! cheers

  • @Pedro5antos_
    @Pedro5antos_ 4 роки тому +1

    MIND-BLOWING!!!
    Big fan of your channel, Charles! Last week watched your Tests videos and started implementing then, but soon enough they also started to be messy to implement.
    Keep the intermediate/advanced tutorials coming

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

    honesty I did not expect using a pattern for Testing! ,The video is great especially
    if you using headphones, the audio really sounds like there's two ppl here. Would be great to see more patterns for Testing! Thanks

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

    I love the way you explain patterns! Please keep going - the style of video is awesome and I had no chance to be bored. Thank you!

    • @InfallibleCode
      @InfallibleCode  5 років тому +2

      Glad to hear you weren't bored! I'll definitely be doing more videos like this so stay tuned :D

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

    how do i write unit tests for my unit tests

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

    Really interesting and useful video, thanks!
    The builder design patter it's a really famous and useful one, as you said, specially in Unit Test.
    But things tend to become really dark and complex when generics come up.
    What about given some examples to the public about Builder patter with generics? :)

  • @Pookzob
    @Pookzob 5 років тому +1

    Very nice and practical example. Well explained. Thanks!

  • @W4der
    @W4der 5 років тому +1

    Lol... today I watched your video... and today I implemented this stuff in my project

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

    Awesome, keep going man!

  • @SunnyValleyStudio
    @SunnyValleyStudio 5 років тому

    Good video. I see that writing tests requires refactoring of its own. I hope it will be worth it in a long run to learn how to unit test correctly. Also thanks for answering a question about when to use Zenject in your latest stream. I really appreciate you sharing your knowledge :)

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

    thanks for this! props on trying to make the tutorial different to the rest with the screenplay :) ps, Rider looks awesome

  • @MichaelBryne
    @MichaelBryne 5 років тому +2

    Also, another question I've just run into if you don't mind, where would Prefab loading / instantiation take place in the context of using data builders? Would you typically be passing in a Prefab instance (loaded via AssetDatabase etc) via the tests SetUp method or would you be putting handling the Prefab loading in the Data Builder itself?

    • @InfallibleCode
      @InfallibleCode  5 років тому

      I generally don’t load prefabs into my unit tests because it adds a layer of abstraction that makes bugs harder to track down. But if you’re going to use them, I’d suggest you loading them on the SetUp method.

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

    when i do the "main" assemblt definition it ruines my TMPRO import which is for text mash pro. ive tried to change the name of the folder and it didnt help, what should i do pls help :(

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

    Could you tell us how to properly integrate fluent assertion to unity please?

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

    Why does my FluentAssertion does not work?

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

    is it good or bad practice to use it in Factory pattern? If i want to spawn units/items/bullets/anything with it?

  • @MichaelBryne
    @MichaelBryne 5 років тому +1

    Hey there, loved your (older) video on Data Builders but I haven't come across Fluent Assertions yet, do you have a video on using those available?

    • @InfallibleCode
      @InfallibleCode  5 років тому

      Not yet, but I have one in the works so stay tuned!

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

    hey is that a gans 356? :)

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

    The syntactic sugar with static classes is nice but isn't it possible to have use previously set variables when you don't want to? Like I set the capacity once and build, then the next time we build we forget to set the capacity and implicitly use the previous capacity. That's unlikely to matter much in most cases since you would have specified the capacity if you need it. However, you could also end up with a large array you don't need if you don't pay attention to the previous capacity.
    OR I could be missing something here.

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

      I could be wrong, but I think because it's an expression body, A.Bag should be thought of as a method/property that simply returns a brand new BagBuilder. This means each time you use it, the state of BagBuilder is brand new as well.

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

    thank you so much !

  • @boscohyun
    @boscohyun 5 років тому +1

    It’s cool! Thanks!

  • @171694
    @171694 5 років тому +1

    Great video!

  • @zandzpider
    @zandzpider 5 років тому +3

    great video! but are you sure hiding how the classes under test is a good idea? seems like you need to dig a lot deeper into the test system and helper classes to see how it works. i think the classes under test should have been written better to improve some of the mess here.

  • @jeremyboetticher5640
    @jeremyboetticher5640 5 років тому +1

    If I have a lot of classes, will I have to keep putting in "static class X" in the A & An classes?
    If so, would it be better to mark those classes as partial so that there are fewer merge conflicts?

    • @InfallibleCode
      @InfallibleCode  5 років тому

      Hmm it’s an interesting idea but my intuition says not to use a partial class for this. I’d think you’d have to have a pretty large and active team in order to run into merge conflicts. Not to say it wouldn’t happen, but I don’t think it would be that common or difficult to overcome.

  • @ANY-yx7bh
    @ANY-yx7bh 2 роки тому

    great, thanks

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

    ThinkPad T430 0:14

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

    awesome!

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

    coding overhead... a lot of new code, with a lot of new possibility for mistakes.
    Needs other mindset if we have to modify....
    Looks nice, for sure.

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

    Nice video but we can make it even better with more meta methods

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

    TOP man, tks

  • @philipvaninting7257
    @philipvaninting7257 5 років тому

    mirrored

  • @AlexeyKamchatkin
    @AlexeyKamchatkin 5 років тому +1

    Design patterns for coding, unit tests whatever