Exemple #1
0
        public void GetAllBets()
        {
            //initiallizing
            var unitOfWork = new Mock <IUnitOfWork>();
            var finder     = new Mock <IBetFinder>();
            var collection = new Mock <IRepository <Bet> >();

            var service = new BetService(unitOfWork.Object, finder.Object, collection.Object);

            //act
            finder.Setup(x => x.FindAllBets())
            .Returns(new List <Bet>());

            service.GetAllBets();

            //assert
            finder.Verify(x => x.FindAllBets());
        }