Esempio n. 1
0
 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;
 }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
 public void TestInit()
 {
     httpHelper = new HttpHelper();
     fsHelper = new FileSystemHelper();
 }