Example #1
0
 private void TeamDomainChange(TeamDomainChange message)
 {
     this.BotState.Team.Domain = message.Domain;
 }
Example #2
0
        public void HandlesValidTeamDomainChange()
        {
            var team = new TeamData { Domain = "team.com" };
            var mockState = new Mock<IBotState>();
            mockState.Setup(s => s.Team).Returns(team).Verifiable();

            var message = new TeamDomainChange
            {
                Type = EventType.TeamDomainChange,
                Domain = "team2.com"
            };

            RunHandler(message, mockState);

            Assert.Equal("team2.com", team.Domain);
        }