-
Hi @mizrael! Thanks for developing OpenSleigh! I was experimenting with the framework today, and after creating a Saga with a few steps, I tried writing unit tests for it. I thought this would be trivial: create an instance of my Saga class, and write tests for each of its methods. However, I found that tests will fail, since the Saga's Am I missing something somewhere, or is it just quite difficult to unit test Saga's? In the former case, could you please point me in the right direction, and in the latter case, I'd be glad to open an issue and submit a pull request to, for example, add an extra constructor to Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
hi, thank you very much for reaching out! I'll be honest, I've been focusing a lot on the whole library but I think I've left this unattended. Let me think about it a bit, I'll get back to you ASAP. Cheers! |
Beta Was this translation helpful? Give feedback.
-
hi @knarka, I've made few changes to the code. I've decided to add a I've also added a test project to the first sample, just to give an idea. I still have to merge the changes into the development branch, I just wanted to know if this is a viable solution for you. You can find the changes here: 885bbdf Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi! Thanks for your quick response and changes! Really appreciate it 😄 I think I can test everything I need to test like this, and even though it is indeed a breaking change, it should be easy to account for by just updating the saga constructors. |
Beta Was this translation helpful? Give feedback.
hi @knarka, I've made few changes to the code. I've decided to add a
TState
param to theTSaga
constructor, as you suggested.Unfortunately, this is a somewhat breaking change (albeit quite small), so I apologize if this is causing any issue.
I've also added a test project to the first sample, just to give an idea.
I still have to merge the changes into the development branch, I just wanted to know if this is a viable solution for you. You can find the changes here: 885bbdf
Thanks!