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

            Assert.Throws <DomainRuleViolatedException>(() =>
            {
                selector.EnterComfort();
                selector.EnterComfort();
            });
        }
示例#2
0
        public void EnteringComfortModeResultsInEvent()
        {
            var selector = new ResponsivenessModeSelector();

            selector.EnterEconomic();
            var events = selector.EnterComfort();

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