public void GetBetsByType() { //initiallizing var bet = new Bet(); 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.FindBetsByType(bet.BetItemType)) .Returns(new List <Bet>()); service.GetBetsByType(bet.BetItemType); //assert finder.Verify(x => x.FindBetsByType(It.IsAny <ItemType>())); }