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
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
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? :)
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 :)
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?
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.
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 :(
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.
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.
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.
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?
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.
❤️ Consider supporting this channel by becoming a Patron: www.patreon.com/infalliblecode
You have really improved your video quality in every way :) these intros are awesome, keep going man ! cheers
Thank you!
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
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
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!
Glad to hear you weren't bored! I'll definitely be doing more videos like this so stay tuned :D
how do i write unit tests for my unit tests
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? :)
Very nice and practical example. Well explained. Thanks!
Lol... today I watched your video... and today I implemented this stuff in my project
Awesome, keep going man!
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 :)
thanks for this! props on trying to make the tutorial different to the rest with the screenplay :) ps, Rider looks awesome
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?
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.
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 :(
Could you tell us how to properly integrate fluent assertion to unity please?
Why does my FluentAssertion does not work?
is it good or bad practice to use it in Factory pattern? If i want to spawn units/items/bullets/anything with it?
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?
Not yet, but I have one in the works so stay tuned!
hey is that a gans 356? :)
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.
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.
thank you so much !
It’s cool! Thanks!
Great video!
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.
I agree
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?
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.
great, thanks
ThinkPad T430 0:14
awesome!
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.
Nice video but we can make it even better with more meta methods
TOP man, tks
mirrored
Design patterns for coding, unit tests whatever