Unit tests and mock objects with Oil extension
Hello
I am trying to write some unit tests for my application in which I am using the Oil extension.
My application follows the examples described in the first secion Async Promise here
https://github.com/darscan/robotlegs-extensions-Oil
But how do I go about writing unit test when I want to test if my model reacts accordingly given a set of various data returned from my service? How would I create that mock service object making the mock callback that my model is waiting on?
I saw examples when there is an actual immediate return value but that was not really applicable to my case (as far as I understood anyway)
Hoping I'm on the right track at least.
Thanks for your help!
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by creynders on 16 Jul, 2013 10:29 AM
I responded to your SO question instead, since it provided more info.
2 Posted by yung.melissa on 16 Jul, 2013 10:34 AM
Thanks! :)
Support Staff 3 Posted by creynders on 16 Jul, 2013 01:51 PM
Glad it helped!
creynders closed this discussion on 16 Jul, 2013 01:51 PM.