public static IPictureService FakeImageService() { IPictureRepository pictureRepository = FakeImageRepository(); IPictureStorageRepository imageStorageRepository = Mock.Of<IPictureStorageRepository>(); FileSystemHelper fsHelper = new FileSystemHelper(); IPictureService pictureService = new PictureService(pictureRepository, imageStorageRepository, fsHelper); return pictureService; }
public PictureService(IPictureRepository pictureRepository, IPictureStorageRepository pictureStorageRepository, FileSystemHelper fsHelper) { Ensure.That(() => pictureRepository).IsNotNull(); Ensure.That(() => pictureStorageRepository).IsNotNull(); Ensure.That(() => fsHelper).IsNotNull(); this.pictureRepository = pictureRepository; this.pictureStorageRepository = pictureStorageRepository; this.fsHelper = fsHelper; }
public void TestInit() { httpHelper = new HttpHelper(); fsHelper = new FileSystemHelper(); }