public void Setup()
        {
            _cache = Substitute.For <IImageCache>();
            _avatarImageNameProvider = Substitute.For <IImageNameProvider>();
            _avatarImageNameProvider.Get(Email).Returns($"{Email}.png");

            _service = new GravatarService(_cache, _avatarImageNameProvider);
        }
예제 #2
0
 public GravatarService(IImageCache imageCache, IImageNameProvider avatarImageNameProvider)
 {
     _cache = imageCache;
     _avatarImageNameProvider = avatarImageNameProvider;
 }