Пример #1
0
        public void Should_throw_exception_when_already_activated()
        {
            var theme = new Theme();

            theme.Activate();

            Assert.Throws <Exception>(() => theme.Activate());
        }
Пример #2
0
        public void Should_set_theme_status_to_activated()
        {
            var theme = new Theme();

            theme.Activate();

            Assert.AreEqual(true, theme.Status == ThemeStatus.Active);
        }
Пример #3
0
        public void Should_set_id_in_theme_activated_event()
        {
            var theme = new Theme();

            theme.Activate();

            var @event = theme.Events.OfType <ThemeActivated>().SingleOrDefault();

            Assert.AreEqual(theme.Id, @event.AggregateRootId);
        }
Пример #4
0
        public void Should_add_theme_activated_event()
        {
            var theme = new Theme();

            theme.Activate();

            var @event = theme.Events.OfType <ThemeActivated>().SingleOrDefault();

            Assert.IsNotNull(@event);
        }