package test;

import chat.*;

public class TestChatCore {

	public static void main(String[] args) throws ChatroomExistsException {
		Chatter bob = new TextChatter ("Bob");
		Chatter joe = new TextChatter ("Joe");
		TopicsManager gt = new TextTopicsManager();
		gt.createTopic("java");
		gt.createTopic("UML");
		//gt.createTopic("UML");	// additional test
		gt.listTopics();
		gt.createTopic("jeux");
		gt.listTopics();
		Chatroom cr = gt.joinTopic("jeux");
		cr.join(bob);
		cr.post("Je suis seul ou quoi ?",bob);
		//cr.post("TEST", joe);
		cr.join(joe);
		//cr.join(joe);	// additional test
		cr.post("Tiens, salut Joe !",bob);
		cr.post("Toi aussi tu chat sur les forums de jeux pendant les TP, Bob?",joe);
		cr.quit(bob);
	}
}
