public void TestSuccess() { User loggedUser = new User(); User friend = new User(); friend.AddFriend(loggedUser); List <Wallet> wallets = new List <Wallet>(); wallets.Add(new Wallet()); wallets.Add(new Wallet()); wallets.Add(new Wallet()); IWalletDAO walletDao = Substitute.For <IWalletDAO>(); walletDao.FindWalletsByUser(friend).Returns(wallets); IUserSession userSession = Substitute.For <IUserSession>(); userSession.GetLoggedUser().Returns(loggedUser); WalletService service = new WalletService(userSession, walletDao); List <Wallet> result = service.GetWalletsByUser(friend); Assert.IsNotNull(result); Assert.AreEqual(wallets.Count, result.Count); }
public WalletService() { walletDao = new WalletDAO(); userSession = UserSession.GetInstance() }
public WalletService(IUserSession userSession, IWalletDAO walletDao) { this.userSession = userSession; this.walletDao = walletDao; }
public WalletService() { this.userSession = UserSession.GetInstance(); this.walletDao = new WalletDAO(); }
public WalletService(IUserSession userSession, IWalletDAO walletDao) { _walletDao = walletDao; _userSession = userSession; }
public WalletService(ILoggedUser IloggedUser, IWalletDAO IwalletDAO) { _ILoggedUser = IloggedUser; _IWalletDAO = IwalletDAO; }
public WalletService(IWalletDAO walletDAO) => this.walletDAO = walletDAO;
public WalletService(IUserSession userSession, IWalletDAO walletDAO) { _userSession = userSession; _walletDAO = walletDAO; }