예제 #1
0
        public void GetById_on_success()
        {
            //Arrange
            var checkingAccount = new CheckingAccount();
            var id = 1;

            _checkingAccountServiceMock.FindById(id).Returns(checkingAccount);

            //Act
            var result   = _checkingAccountController.GetById(id);
            var okResult = result.Result as OkObjectResult;

            //Assert
            Assert.IsType <OkObjectResult>(result.Result);
            Assert.IsType <CheckingAccount>(okResult.Value);
        }