public void CannotSetSameAggressivenessLevelTwice() { var selector = new ResponsivenessModeSelector(); Assert.Throws <DomainRuleViolatedException>(() => { selector.SetAggressivenessLevel(AggressivenessLevel.First); selector.SetAggressivenessLevel(AggressivenessLevel.First); }); }
public void SettingAggressivenessLevelResultsInEvent() { var selector = new ResponsivenessModeSelector(); var events = selector.SetAggressivenessLevel(AggressivenessLevel.Second); Assert.True(events.Any(x => x is AggressivenessLevelSelected)); }