コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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");
        }
コード例 #4
0
        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());
        }
コード例 #5
0
 public void Setup()
 {
     _sut = new FbbRosters(
         new FbbEventStore());
 }