My test can't proceed to the if statements and for loops.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, September 5, 2006 01:03 AM

public String toString(String displayType) { StringBuffer str = new StringBuffer(); if (m_seats != null && m_seats.length > 1) { str.append(" ").append(m_rowNumber); for (int seatIndex = 0; seatIndex < m_seats.length; seatIndex++) { // For each seat in this row wrapper - append its relevant display string if (AerLingusDefines.SEAT_SELECTION_AVAILABILITY_DISPLAY.equals (displayType)) { str.append(" ").append(m_seats [seatIndex].toAvailableString()); } else if (AerLingusDefines.SE   More>>

public String toString(String displayType)

{

StringBuffer str = new StringBuffer();

if (m_seats != null && m_seats.length > 1)

{

str.append("
").append(m_rowNumber);

for (int seatIndex = 0; seatIndex <

m_seats.length; seatIndex++)

{

// For each seat in this row wrapper -

append its relevant display string

if

(AerLingusDefines.SEAT_SELECTION_AVAILABILITY_DISPLAY.equals

(displayType))

{

str.append(" ").append(m_seats

[seatIndex].toAvailableString());

}

else if

(AerLingusDefines.SEAT_SELECTION_READ_ONLY_DISPLAY.equals

(displayType))

{

str.append(" ").append(m_seats

[seatIndex].toReadOnlyString());

}

else

{

str.append(" ").append(m_seats

[seatIndex].toString());

}

}

}

return str.toString();

}


----------

THIS IS MY TEST

public void testtoString()

{

String displayType = "";

SeatMapWrapper host = new SeatMapWrapper();

String expResult = "";

String result = host.toString(displayType);

assertEquals(expResult, result);

fail("Unexpected error occurs");

}

   <<Less

Re: My test can't proceed to the if statements and for loops.

Posted By:   Anonymous  
Posted On:   Thursday, September 14, 2006 11:15 AM

Please format your code properly if you want other people to help you out.
About | Sitemap | Contact