コード例 #1
0
ファイル: MockHelpers.cs プロジェクト: bevacqua/bruttissimo
 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;
 }
コード例 #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;
        }
コード例 #3
0
ファイル: UtilityTests.cs プロジェクト: bevacqua/bruttissimo
 public void TestInit()
 {
     httpHelper = new HttpHelper();
     fsHelper = new FileSystemHelper();
 }