public FilterPlayer ( Player player, bool visible ) : void | ||
player | Player | |
visible | bool | |
리턴 | void |
public void TestClearAll() { Project p = Utils.CreateProject (); try { EventsFilter filter = new EventsFilter (p); filter.FilterPlayer (p.LocalTeamTemplate.List [0], true); Assert.AreEqual (1, filter.VisiblePlays.Count); Assert.AreEqual (1, filter.VisiblePlayers.Count); filter.ClearAll (); Assert.AreEqual (3, filter.VisiblePlays.Count); Assert.AreEqual (10, filter.VisiblePlayers.Count); filter.FilterEventType (p.EventTypes [0], true); Assert.AreEqual (1, filter.VisiblePlays.Count); Assert.AreEqual (1, filter.VisibleEventTypes.Count); filter.ClearAll (); Assert.AreEqual (3, filter.VisiblePlays.Count); Assert.AreEqual (13, filter.VisibleEventTypes.Count); filter.FilterEventTag (p.EventTypes [0], (p.EventTypes [0] as AnalysisEventType).Tags [0], true); Assert.AreEqual (0, filter.VisiblePlays.Count); Assert.AreEqual (1, filter.VisibleEventTypes.Count); filter.ClearAll (); Assert.AreEqual (3, filter.VisiblePlays.Count); Assert.AreEqual (13, filter.VisibleEventTypes.Count); } finally { Utils.DeleteProject (p); } }
public void TestFilterPlayers() { Project p = Utils.CreateProject (); try { EventsFilter filter = new EventsFilter (p); Assert.AreEqual (10, filter.VisiblePlayers.Count); Assert.AreEqual (3, filter.VisiblePlays.Count); filter.FilterPlayer (p.LocalTeamTemplate.List [4], true); Assert.AreEqual (0, filter.VisiblePlays.Count); Assert.AreEqual (1, filter.VisiblePlayers.Count); filter.FilterPlayer (p.LocalTeamTemplate.List [0], true); Assert.AreEqual (1, filter.VisiblePlays.Count); Assert.AreEqual (2, filter.VisiblePlayers.Count); filter.FilterPlayer (p.LocalTeamTemplate.List [0], true); Assert.AreEqual (1, filter.VisiblePlays.Count); Assert.AreEqual (2, filter.VisiblePlayers.Count); filter.FilterPlayer (p.LocalTeamTemplate.List [0], false); Assert.AreEqual (0, filter.VisiblePlays.Count); Assert.AreEqual (1, filter.VisiblePlayers.Count); filter.FilterPlayer (p.LocalTeamTemplate.List [4], false); Assert.AreEqual (10, filter.VisiblePlayers.Count); Assert.AreEqual (3, filter.VisiblePlays.Count); } finally { Utils.DeleteProject (p); } }