Esempio n. 1
0
        public void Apply_ShouldIncrease_DeletedCounter()
        {
            var handler = new DeletedState.Handler();

            handler.Apply(_context.Object, _transactionMock.Object);

            _transactionMock.Verify(x => x.IncrementCounter("stats:deleted"), Times.Once);
        }
Esempio n. 2
0
        public void Unapply_ShouldDecrementStatistics()
        {
            var handler = new DeletedState.Handler();

            handler.Unapply(_context.Object, _transactionMock.Object);

            _transactionMock.Verify(x => x.DecrementCounter("stats:deleted"), Times.Once);
        }
Esempio n. 3
0
        public void ShouldWorkOnlyWithDeletedState()
        {
            var handler = new DeletedState.Handler();

            Assert.Equal(DeletedState.StateName, handler.StateName);
        }