Beispiel #1
0
        public void CheckingAccounts_Service_GetExtract_Should_Be_OK()
        {
            //Arrange
            long id = 1;

            _mockRepositoryAccount.Setup(r => r.GetById(id))
            .Returns(_checkingAccount);

            //Action
            object returns = _service.GetExtract(id);

            //Verify
            _mockRepositoryAccount.Verify(r => r.GetById(id));
            returns.Should().NotBeNull();

            Type type = returns.GetType();

            foreach (System.Reflection.PropertyInfo item in type.Properties())
            {
                item.GetValue(returns).Should().NotBeNull();
            }
        }
Beispiel #2
0
 public IHttpActionResult GetExtracts(int id)
 {
     return(HandleCallback(() => _accountsService.GetExtract(id)));
 }