public void ShouldBeAbleToModifyAConference() { const string newName = "Modified Conference"; var conference = SetupEntity<Conference, Guid>(TestData.Conference).AddToRepository(); var command = new ModifyConference(conference.Id) { Name = newName, Starts = conference.Starts, Ends = conference.Ends}; command.Execute(); conference.Name.ShouldEqual(newName); }
public void ShouldPersistChangesToEntities() { const string newName = "Modified Conference"; var entity = new Builder<Conference>(TestData.Conference).BuildAndSave(); var command = new ModifyConference(entity.Id) { Name = newName, Starts = entity.Starts, Ends = entity.Ends }; command.Execute(); Session.Flush(); Registry.Repository.Fetch<Conference>(entity.Id).Name.ShouldEqual(newName); }
public void ShouldNotAllowDefaultValuesOnMarkedProperties() { var command = new ModifyConference(TestData.Conference.Id); Assert.Throws<ArgumentException>(command.Execute); }