Ejemplo n.º 1
0
        public void create_a_valid_course()
        {
            var command     = CreateCourseCommandMother.Random();
            var course      = CourseMother.FromRequest(command);
            var domainEvent = CourseCreatedDomainEventMother.FromCourse(course);

            this._handler.Handle(command);

            this.ShouldHaveSave(course);
            this.ShouldHavePublished(domainEvent);
        }
Ejemplo n.º 2
0
        public void create_a_valid_course()
        {
            var request     = CreateCourseRequestMother.Random();
            var course      = CourseMother.FromRequest(request);
            var domainEvent = CourseCreatedDomainEventMother.FromCourse(course);

            this._creator.Invoke(request);

            this.ShouldHaveSave(course);
            this.ShouldHavePublished(domainEvent);
        }