Ejemplo n.º 1
0
 public void AdjacentAddsAreCombined()
 {
     var publisher = new MockPublisher();
     using (var transaction = new Transaction(publisher.CommitCallback))
     {
         transaction.LogAddEvent(Mike, 1);
         transaction.LogAddEvent(Sam, 32);
         transaction.LogAddEvent(Tim, 2);
         publisher.ExpectNoEvents();
     }
     publisher.Expect(Add.AtNew(1).WithNew(Mike, Tim));
     publisher.Expect(Add.AtNew(32).WithNew(Sam));
 }
Ejemplo n.º 2
0
        public void AdjacentAddsAreCombined()
        {
            var publisher = new MockPublisher();

            using (var transaction = new Transaction(publisher.CommitCallback))
            {
                transaction.LogAddEvent(Mike, 1);
                transaction.LogAddEvent(Sam, 32);
                transaction.LogAddEvent(Tim, 2);
                publisher.ExpectNoEvents();
            }
            publisher.Expect(Add.AtNew(1).WithNew(Mike, Tim));
            publisher.Expect(Add.AtNew(32).WithNew(Sam));
        }