Ejemplo n.º 1
0
 public Startup(IConfiguration configuration)
 {
     Configuration  = configuration;
     stats          = new Stats();
     settings       = new Settings();
     voteCache      = new VoteResultCache();
     voteCache.Vote = new VoteResult("none");
 }
Ejemplo n.º 2
0
 public void Setup()
 {
     stats    = new Stats();
     settings = new Settings
     {
         MobiRobiBaseUrl = "http://google.com/",
     };
     restClientMock = new Mock <IRestClient>();
     voteCache      = new VoteResultCache();
     timeMock       = new TimeMock();
     classUnderTest = new VoteTimer(stats, settings, restClientMock.Object, voteCache, timeMock);
     classUnderTest.Start();
 }
 public VoteTimer(Stats stats, ISettings settings, IRestClient client, IVoteResultCache voteCache, ITime time)
 {
     if (stats == null)
     {
         throw new ArgumentException("stats cannot be null");
     }
     if (client == null)
     {
         throw new ArgumentException("client cannot be null");
     }
     if (time == null)
     {
         throw new ArgumentException("time cannot be null");
     }
     if (voteCache == null)
     {
         throw new ArgumentException("voteCache cannot be null");
     }
     this.client    = client;
     this.stats     = stats;
     this.voteCache = voteCache;
     this.time      = time;
     this.settings  = settings;
 }
 public VoteResultController(IVoteResultCache voteCache)
 {
     this.voteCache = voteCache;
 }