public void Update(ICommand<UserStoryIdentity> command, Action<UserStory> methodToCall) { var changes = eventStore.GetStream(command.Identity); var userStoryState = new UserStoryState(changes); var userStory = new UserStory(userStoryState); methodToCall(userStory); eventStore.AppendToStream(command.Identity, userStory.Changes); eventsPublisher.Publish(userStory.Changes); }
protected override void When() { userStoryState = new UserStoryState(new List<IEvent>() { new UserStoryCreated(id, name, description), new UserStoryEstimated(id, storyPoints) }); }
public MyUserStory(UserStoryState state) : base(state) { }
protected override void Given() { state = new UserStoryState(new List<IEvent>()); us = new MyUserStory(state); ui = new UserStoryIdentity("1"); }
public UserStory(UserStoryState state) { this.state = state; }