Пример #1
0
        public async Task MakeActiveVerifyOnce()
        {
            //Arrange
            int id         = 1;
            var mockPerson = new Mock <IPersonWebService>();
            var mockWallet = new Mock <IWalletWebService>();
            var controller = new WalletController(mockWallet.Object, mockPerson.Object);

            mockWallet.Setup(x => x.MakeActive(id));

            //Act
            await controller.MakeActive(id);

            //Assert
            mockWallet.Verify(x => x.MakeActive(id), Times.Once);
        }