コード例 #1
0
 //
 // Utility Test Methods
 //
 private int countClosers(TeamPitchingProfile profile)
 {
     if (profile.Closer() == null)
     {
         return(0);
     }
     return(1);
 }
コード例 #2
0
        public void testProfiler_normal_lineup()
        {
            List <Player>       pitchers = buildListOfTestPitchers(TEST_TEAM_NORMAL);
            TeamPitchingProfile profile  = TeamPitchingProfile.generatedLikelyUsage(pitchers);

            Assert.AreEqual(8, profile.Starters().Count, "Count Starting Pitcher");
            Assert.AreEqual(7, profile.Relievers().Count, "Count Relieft Pitcher");
            Assert.AreEqual(1, countClosers(profile), "Count Closers Pitcher");
        }
コード例 #3
0
        public void testProfiler_full_test_lineup()
        {
            List <Player>       pitchers = buildListOfTestPitchers(TEST_FULL_TEST_SQUAD);
            TeamPitchingProfile profile  = TeamPitchingProfile.generatedLikelyUsage(pitchers);

            Assert.AreEqual(7, profile.Starters().Count, "Count Starting Pitcher");
            int closerCount = countClosers(profile);

            //       Assert.AreEqual(pitchers.Count- profile.Starters().Count- closerCount,
            //           profile.Relievers().Count, "Count Relief Pitchers");
            Assert.AreEqual(1, closerCount, "Count Closers");
        }