예제 #1
0
 public void Setup()
 {
     _testRep = new TestRepository();
     _rep = new CachingRepository(_testRep, new TestEventStore());
     _aggregate = _testRep.Get<TestAggregate>(Guid.NewGuid());
     _rep.Save(_aggregate,-1);
 }
예제 #2
0
 public void Setup()
 {
     _rep = new CachingRepository(new TestRepository(), new TestEventStore());
     _aggregate = _rep.Get<TestAggregate>(Guid.NewGuid());
 }
 public void Should_track_changes()
 {
     var agg = new TestAggregate(Guid.NewGuid());
     _session.Add(agg);
     var aggregate = _session.Get<TestAggregate>(agg.Id);
     Assert.AreEqual(agg,aggregate);
 }