예제 #1
0
        protected override void Given()
        {
            id = new CollectionIdentity("1");
            usId = new UserStoryIdentity("3");

            collectionState = new CollectionState(new List<IEvent>(){new CollectionCreated("1","To Do", 1), new UserStoryAdded("2")});
            collection = new MyCollection(collectionState);
        }
예제 #2
0
        public virtual void Update(ICommand<CollectionIdentity> command, Action<Collection> methodToCall)
        {
            var changes = eventStore.GetStream(command.Identity);

            var state = new CollectionState(changes);
            var collection = new Collection(state);
            methodToCall(collection);

            eventStore.AppendToStream(command.Identity, collection.Changes);
            eventsPublisher.Publish(collection.Changes);
        }
예제 #3
0
 protected override void When()
 {
     collectionState = new CollectionState(stream);
 }
예제 #4
0
 protected override void Given()
 {
     identity = new CollectionIdentity("1");
     collectionState = new CollectionState(new List<IEvent>());
     collection = new MyCollection(collectionState);
 }
예제 #5
0
 public Collection(CollectionState state)
 {
     this.state = state;
 }
예제 #6
0
 public MyCollection(CollectionState state)
     : base(state)
 {
 }