Exemple #1
0
 private void TeamRename(TeamRename message)
 {
     this.BotState.Team.Name = message.Name;
 }
Exemple #2
0
        public void HandlesValidTeamRename()
        {
            var team = new TeamData { Name = "Team1" };
            var mockState = new Mock<IBotState>();
            mockState.Setup(s => s.Team).Returns(team).Verifiable();

            var message = new TeamRename
            {
                Type = EventType.TeamRename,
                Name = "Team1b"
            };

            RunHandler(message, mockState);

            Assert.Equal("Team1b", team.Name);
        }