public void TestAddChat() { ChatroomList chatroomList = new ChatroomList(); ChatroomLogic chatroomLogic = new ChatroomLogic(); chatroomList.addChat(chatroomLogic); chatroomList.addChat(chatroomLogic); }
public void TestIDToChatroom() { ChatroomList chatroomList = new ChatroomList(); ChatroomLogic chatroomLogic = new ChatroomLogic(); chatroomList.addChat(chatroomLogic); int id = chatroomLogic.chatroomID; chatroomList.addChat(new ChatroomLogic()); Assert.AreEqual(chatroomLogic, chatroomList.idToChatroom(id)); Assert.AreNotEqual(chatroomLogic, chatroomList.idToChatroom(id + 1)); }
public void TestUpdate() { ChatroomList chatroomList = new ChatroomList(); ChatroomLogic chatroomLogic = new ChatroomLogic(); chatroomList.addChat(chatroomLogic); //chatroomList.update(new Message(0, "Hello World", "SEND"), 0);//This will make real additions to the sql database and send TCP packets. Not sure how to test. }