[Dev] How to write tests for dynamically changing contents?

2014-09-08 Thread Madusanka Premaratne
Hi all, We are currently developing an ESB connector for Google+ and we need to write some tests for Google+ comments list. But the comment list changes dynamically when a user puts a comment. How can we do a unit test for this.? According to my knowledge, I know that we can use mock concept. Is th

Re: [Dev] How to write tests for dynamically changing contents?

2014-09-08 Thread Chan
Hi Madusanka, It all comes down to what you test. IMO there a 3 things to test - - Whether Google+ API is working :) (This would probably be a test and debug so that we can isolate the problem head on) - Check if Google+ comment object is as expected. If JSON -perform a key check. -