DoThis() public méthode

public DoThis ( ) : void
Résultat void
Exemple #1
0
 protected override void Given()
 {
     _stubEventBus = new InMemoryEventBus(new MessageRouterStub());
     _publishedEvents = new List<IDomainEvent>();
     _stubEventBus.EventPublished = (y) => _publishedEvents.Add(y);
     _eventStore = new StubEventStore(_stubEventBus);
     _aggregate = new StubAggregate();
     _aggregate.DoThis();
     _aggregate.DoSomethingElse();
     _aggregate.DoThis();
     _aggregate.DoSomethingElse();
     _eventStore.Insert(_aggregate);
     _eventStore.Commit();
 }
 public void Setup()
 {
     // Arrange
     _eventPublisher = new InMemoryEventBus(new MessageRouterStub());
     var eventStore = new RavenEventStore(_eventPublisher, "RavenDB");
     eventStore.DeleteCollection();
     _aggregate = new StubAggregate();
     _aggregate.AggregateId = Guid.NewGuid();
     _aggregate.DoThis();
     _aggregate.DoSomethingElse();
     _aggregate.DoThis();
     _aggregate.DoSomethingElse();
     _aggregateId = _aggregate.AggregateId;
     eventStore.Insert(_aggregate);
     eventStore.Commit();
 }
 public void Setup()
 {
     // Arrange
     _eventPublisher = new InMemoryEventBus(new MessageRouterStub());
     var mongoConfig = new MongoConfiguration()
     {
         DatabaseName = "EventTestDB"
     };
     var eventStore = new MongoEventStore(mongoConfig, _eventPublisher);
     eventStore.DeleteCollection();
     _aggregate = new StubAggregate();
     _aggregate.AggregateId = Guid.NewGuid();
     _aggregate.DoThis();
     _aggregate.DoSomethingElse();
     _aggregate.DoThis();
     _aggregate.DoSomethingElse();
     _aggregateId = _aggregate.AggregateId;
     eventStore.Insert(_aggregate);
     eventStore.Commit();
 }