Blazored / Toast

A JavaScript free toast library for Blazor and Razor Component applications
https://blazored.github.io/Toast/
MIT License
663 stars 92 forks source link

Added bUnit extention and test examples to Toast #117

Closed OliverBack closed 3 years ago

OliverBack commented 3 years ago
chrissainty commented 3 years ago

@Egil do you have any thoughts on the bUnit test extensions?

egil commented 3 years ago

@Egil do you have any thoughts on the bUnit test extensions?

More questions :-)

I was expecting to see a fake implementation of IToastService, that would record any calls made to it display toasts, and allow users to assert against it. What are the ideas behind this approach?

chrissainty commented 3 years ago

@egil Yep. That's a fair point. We got a little bit carried away here in hindsight. You're correct, we don't need to actually render the toasts at all. We'll rework this.

egil commented 3 years ago

@egil Yep. That's a fair point. We got a little bit carried away here in hindsight. You're correct, we don't need to actually render the toasts at all. We'll rework this.

Been there done that. My suggestion is to create a fake service that has a few query methods that users can easily combine with their assertion framework of choice.

OliverBack commented 3 years ago

@egil Thanks! We have updated the approach as per your suggestion. What do you think?

anitagov commented 3 years ago

@chrissainty - Any idea when this PR will be completed?

chrissainty commented 3 years ago

I'm hoping very soon. @OliverBack any ideas when we'll be done on this?

OliverBack commented 3 years ago

@chrissainty, @anitagov Hopefully have the pr ready for today

anitagov commented 3 years ago

Thanks for adding this feature @chrissainty . Will try to migrate to using this in September. My current approach for testing Toast messages with bunit is having issues as Blazored Toast tests fail when I run tests together or in the pipeline.