
fitbook.ChatServerActions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fitlibrary Show documentation
Show all versions of fitlibrary Show documentation
FitLibrary provides general-purpose fixtures (and runners) for storytests with Fit and FitNesse.
The newest version!
package fitbook;
import fitbook.chat.ChatRoom;
/*
* @author Rick Mugridge 8/12/2003
*
* Copyright (c) 2003 Rick Mugridge, University of Auckland, NZ
* Released under the terms of the GNU General Public License version 2 or later.
*
*/
/**
* Test some simple changes to a chat room
*/
public class ChatServerActions extends fit.Fixture { //COPY:ALL
private ChatRoom chat = new ChatRoom(); //COPY:ALL
private String userName = ""; //COPY:ALL
private String roomName = ""; //COPY:ALL
//COPY:ALL
public void user(String userName2) { //COPY:ALL
this.userName = userName2; //COPY:ALL
} //COPY:ALL
public void connect() { //COPY:ALL
chat.connectUser(userName); //COPY:ALL
} //COPY:ALL
public void room(String roomName2) { //COPY:ALL
this.roomName = roomName2; //COPY:ALL
} //COPY:ALL
public void newRoom() { //COPY:ALL
chat.userCreatesRoom(userName, roomName); //COPY:ALL
} //COPY:ALL
public void enterRoom() { //COPY:ALL
chat.userEntersRoom(userName,roomName); //COPY:ALL
} //COPY:ALL
public int occupantCount() { //COPY:ALL
return chat.occupants(roomName); //COPY:ALL
} //COPY:ALL
public void disconnect() {
chat.disconnectUser(userName);
}
} //COPY:ALL
© 2015 - 2025 Weber Informatics LLC | Privacy Policy