Ejemplo n.º 1
0
        public void Should_be_able_to_change_the_name()
        {
            var conference = new Conference("Foo");

            conference.ChangeName("Bar");

            conference.Name.ShouldEqual("Bar");
        }
Ejemplo n.º 2
0
        public void Handle(ConferenceEditModel form)
        {
            Conference conf = _repository.GetById(form.Id);

            conf.ChangeName(form.Name);

            foreach (var attendeeEditModel in GetAttendeeForms(form))
            {
                Attendee attendee = conf.GetAttendee(attendeeEditModel.Id);

                attendee.ChangeName(attendeeEditModel.FirstName,
                                    attendeeEditModel.LastName);
                attendee.Email = attendeeEditModel.Email;
            }
        }