コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }