Ejemplo n.º 1
0
        public void Apply_ShouldIncrease_SucceededCounter()
        {
            var handler = new SucceededState.Handler();
            handler.Apply(_context, _transactionMock.Object);

            _transactionMock.Verify(x => x.IncrementCounter("stats:succeeded"), Times.Once);
        }
Ejemplo n.º 2
0
        public void Unapply_ShouldDecrementStatistics()
        {
            var handler = new SucceededState.Handler();
            handler.Unapply(_context, _transactionMock.Object);

            _transactionMock.Verify(x => x.DecrementCounter("stats:succeeded"), Times.Once);
        }
Ejemplo n.º 3
0
 public void ShouldWorkOnlyWithSucceededState()
 {
     var handler = new SucceededState.Handler();
     Assert.Equal(SucceededState.StateName, handler.StateName);
 }