Exercise 17


Assume you've made the changes to XTrackTest and created the additional classes, as illustrated in this chapter. Assume you're now going to add a third interface that will run the tests through a GUI tool called GUITAR.

Q1:

Indicate the changes required to LoginStoryTest (warning: this is a trick question):

 public class LoginStoryTest {    public void testLogin() {       assertTrue( login("bob","bobspassword") );       assertTrue( login("BOB","bobspassword") );       assertFalse(login("bob",""));       assertFalse(login("bob","BOBSPASSWORD") );    } } 
Q2:

Indicate the changes required to the setInterface method of XTrackTest:

 public void setTestInterface(String interfaceType){    if (interfaceType.equals("direct"))       testInf = new TrackDirectInterface();    else if (interfaceType.equals("webart"))       testInf = new TrackWebARTInterface();    else       fail("Undefined interface " +        interfaceType); } 
Q3:

Are other changes required to XTrackTest or any other existing class?



Testing Extreme Programming
Testing Extreme Programming
ISBN: 0321113551
EAN: 2147483647
Year: 2005
Pages: 238

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net