| Author |
testing wrapper methods
|
Wendy Gibbons
Bartender
Joined: Oct 21, 2008
Posts: 1098
|
|
my new company have started doing TDD on the new javascript webstuff.
I have written a javascript method:
I can't test it calls the service, as that is an integration test (fully understand)
so what can I actually test?
my mentor wants me to test the parameters are passed in correctly, but these are just constructed in the test.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26496
|
|
|
Can you let the url for the AJAX submission be a fake one? In particular, just a simple one that always returns success or failure so you can test the function logs the right data?
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Wendy Gibbons
Bartender
Joined: Oct 21, 2008
Posts: 1098
|
|
|
a friend (yes my out of work conversations are THAT DULL) suggested i stub the ajax and test the path is correct so that if anyone changes the path in the method it isn't happy.
|
 |
 |
|
|
subject: testing wrapper methods
|
|
|