Designing, building, and testing are very much intertwined pieces of the development process. There are numerous approaches that we could take. I'm going to prescribe some upfront analysis describing the domain model and its behaviors, and then use that written analysis to extract the domain model and produce tests. In the following section, we'll look specifically at the chatroom and how users interact with it.
I'm going to make the assumption that you have used a chatroom of some sort before, such as Slack, Hipchat, Google Hangouts, or Campfire. If you haven't used any of those tools, you should evaluate introducing one into your development team—group chat can be a real boon for engineering teams. We'll focus on an individual chatroom design for the moment, and we can start by describing our expectations for the behavior of the chatroom. A few simple statements about the application's behavior in different contexts can easily...