Esempio n. 1
0
        public void Should_throw_exception_when_already_activated()
        {
            var theme = new Theme();

            theme.Activate();

            Assert.Throws <Exception>(() => theme.Activate());
        }
Esempio n. 2
0
        public void Should_set_theme_status_to_activated()
        {
            var theme = new Theme();

            theme.Activate();

            Assert.AreEqual(true, theme.Status == ThemeStatus.Active);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }