Exemplo n.º 1
0
        public async Task GetAllMethodReturnsCreditCardDetails()
        {
            var creditCardService = new CreditCardService(_creditCardRepositoryMock.Object, _tokenisationServiceMock.Object);
            var creditCards       = await creditCardService.GetAll();

            Assert.AreEqual(creditCards.Count(), 2);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Get a MovementViewModel object
 /// </summary>
 /// <param name="movement"></param>
 /// <returns></returns>
 private async Task <MovementViewModel> GetViewModel(Movement movement)
 {
     return(new MovementViewModel
     {
         Movement = movement,
         Accounts = await _accountService.GetAll(),
         Categories = await _categoryService.GetAll(),
         Subcategories = await _subcategoryService.GetAll(),
         Projects = await _projectService.GetAllActiveProjects(),
         CreditCards = await _creditCardService.GetAll()
     });
 }
 public IEnumerable <CreditCard> GetCreditCards()
 {
     return(service.GetAll());
 }
 public async Task <ActionResult <DataCollection <CreditCardDTO> > > GetAll(int page, int take)
 {
     return(await _CreditCardService.GetAll(page, take));
 }
Exemplo n.º 5
0
 // GET: CreditCards
 public async Task <ActionResult> Index()
 {
     return(View(await _service.GetAll()));
 }