// // Utility Test Methods // private int countClosers(TeamPitchingProfile profile) { if (profile.Closer() == null) { return(0); } return(1); }
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"); }
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"); }