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);
        }
        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);
        }
 protected override void When()
 {
     collectionState = new CollectionState(stream);
 }
 protected override void Given()
 {
     identity = new CollectionIdentity("1");
     collectionState = new CollectionState(new List<IEvent>());
     collection = new MyCollection(collectionState);
 }
Exemple #5
0
 public Collection(CollectionState state)
 {
     this.state = state;
 }
Exemple #6
0
 public MyCollection(CollectionState state)
     : base(state)
 {
 }