Exemplo n.º 1
0
        public void CanHandleTeamMessages()
        {
            var handler = new TeamHandler();

            bool result = false;
            var messageTestCases = new List<EventMessageBase>
            {
                new PrefChange { Type = EventType.PrefChange },
                new UserChange { Type = EventType.UserChange },
                new TeamJoin { Type = EventType.TeamJoin },
                new TeamPrefChange { Type = EventType.TeamPrefChange },
                new TeamRename { Type = EventType.TeamRename },
                new TeamDomainChange { Type = EventType.TeamDomainChange },
                new EmailDomainChanged { Type = EventType.EmailDomainChanged }
            };

            foreach (var messageTestCase in messageTestCases)
            {
                result = handler.CanHandle(messageTestCase);
                Assert.True(result);
            }
        }
Exemplo n.º 2
0
        public void CanHandleTeamMessages()
        {
            var handler = new TeamHandler();

            bool result           = false;
            var  messageTestCases = new List <EventMessageBase>
            {
                new PrefChange {
                    Type = EventType.PrefChange
                },
                new UserChange {
                    Type = EventType.UserChange
                },
                new TeamJoin {
                    Type = EventType.TeamJoin
                },
                new TeamPrefChange {
                    Type = EventType.TeamPrefChange
                },
                new TeamRename {
                    Type = EventType.TeamRename
                },
                new TeamDomainChange {
                    Type = EventType.TeamDomainChange
                },
                new EmailDomainChanged {
                    Type = EventType.EmailDomainChanged
                }
            };

            foreach (var messageTestCase in messageTestCases)
            {
                result = handler.CanHandle(messageTestCase);
                Assert.True(result);
            }
        }