public CigarServiceTests() { testData = new List <Cigar> { new Cigar { Id = 1, Name = "Sample Cigar 1" }, new Cigar { Id = 2, Name = "Sample Cigar 2" }, new Cigar { Id = 3, Name = "Demo Cigar" }, }; mockCigarRepository = new Mock <ICigarRepository>(); mockCigarRepository.Setup(x => x.GetFiltered(It.IsAny <string>(), It.IsAny <string>())) .Returns(testData.ToAsyncEnumerable()); mockCigarRepository.Setup(x => x.Exists(It.IsAny <int>())).Returns(Task.FromResult(true)); mockUnitOfWork = new Mock <IUnitOfWork>(); mockUnitOfWork.SetupGet(x => x.CigarRepository).Returns(mockCigarRepository.Object); cigarService = new CigarService(mockUnitOfWork.Object); }
public TastesController(ITastesService tastesService, ICigarService cigarService) { this.tastesService = tastesService; this.cigarService = cigarService; }
public CigarsController(ICigarService cigarService) { this.cigarService = cigarService; }
public SizesController(ISizeService sizeService, ICigarService cigarService) { this.sizeService = sizeService; this.cigarService = cigarService; }
public BrandsController(IBrandService brandService, ICigarService cigarService, IReviewService reviewService) { this.brandService = brandService; this.cigarService = cigarService; this.reviewService = reviewService; }
public HomeController(ICigarService cigarService, IPictureService pictureService) { this.cigarService = cigarService; this.pictureService = pictureService; }
public StrenghtsController(IStrenghtService strenghtsService, ICigarService cigarService) { this.strenghtsService = strenghtsService; this.cigarService = cigarService; }