public void StarterRequest_ReturnsAllThePitchersForTheDay() { var es = new FbbEventStore.FbbEventStore(); var rm = new FbbRosters(es); var sut = new StarterRequest(rm); var result = sut.Submit( new DateTime(2019, 4, 25)); result.Dump(); Assert.IsNotNull(result); }
public ProbablePitcherViewModel Submit( DateTime gameDate, bool homeOnly = false) { var es = new FbbEventStore.FbbEventStore(); var rm = new FbbRosters(es); var pitcherRequest = new ProbablePitcherRequest(rm, homeOnly); var pitchers = pitcherRequest.Submit(gameDate); return(pitchers); }
public void ProbablePitchers_ReturnsMultiplePitchers() { var es = new FbbEventStore.FbbEventStore(); var rm = new FbbRosters(es); var sut = new ProbablePitcherRequest(rm); var result = sut.Submit(DateTime.Now.AddDays(-1)); result.Dump(); Assert.IsTrue( result.ProbablePitchers.Count > 0, "Should return some pitchers"); }
public void Setup() { var cache = new RedisCacheRepository( connectionString: "localhost,abortConnect=false", environment: "local", functionalArea: "bts", serializer: new XmlSerializer(), logger: new FakeCacheLogger(), expire: false); var es = new FbbEventStore.FbbEventStore(); var rm = new FbbRosters(es); var startingPitcherRepository = new StartingPitchersRepository( rm); var gameLogRepository = new CachedGameLogRepository( new GameLogRepository(), cache); //var gameLogRepository = new GameLogRepository(); _sut = new StartingPitchers( startingPitcherRepository, gameLogRepository, new FakeLogger()); }
public void Setup() { _sut = new FbbRosters( new FbbEventStore()); }