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); }
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); }