示例#1
0
        public void CannotSetSameAggressivenessLevelTwice()
        {
            var selector = new ResponsivenessModeSelector();

            Assert.Throws <DomainRuleViolatedException>(() =>
            {
                selector.SetAggressivenessLevel(AggressivenessLevel.First);
                selector.SetAggressivenessLevel(AggressivenessLevel.First);
            });
        }
示例#2
0
        public void SettingAggressivenessLevelResultsInEvent()
        {
            var selector = new ResponsivenessModeSelector();

            var events = selector.SetAggressivenessLevel(AggressivenessLevel.Second);

            Assert.True(events.Any(x => x is AggressivenessLevelSelected));
        }