Ejemplo n.º 1
0
 public Startup(IOptions <AppSettings> settings, IFacebookCommentsApiWrapper facebookApi, IDisqusCommentsFormatter disqusFormatter, IFileUtils fileUtils)
 {
     _settings       = settings?.Value ?? throw new ArgumentNullException(nameof(settings));
     _facebookApi    = facebookApi ?? throw new ArgumentNullException(nameof(facebookApi));
     _diqusFormatter = disqusFormatter ?? throw new ArgumentNullException(nameof(disqusFormatter));
     _fileUtils      = fileUtils ?? throw new ArgumentNullException(nameof(fileUtils));
 }
Ejemplo n.º 2
0
 public void Init()
 {
     _settings = Substitute.For <IOptions <AppSettings> >();
     _settings.Value.Returns(new AppSettings());
     _facebookApi     = Substitute.For <IFacebookCommentsApiWrapper>();
     _disqusFormatter = Substitute.For <IDisqusCommentsFormatter>();
     _fileUtils       = Substitute.For <IFileUtils>();
 }