public void Res4Phasetest() { LiuBei p1 = new LiuBei(0); SunQuan p2 = new SunQuan(1); IGame game = mocks.Stub <IGame>(); Card attack = new Attack(CardSuit.Spade, 1); // ActionPhase produces attackPhase ActionPhase a = new ActionPhase(p1); PhaseList ret = a.advance(new UseCardAction(attack, p2), game); Phase b = ret.pop(); AttackPhase b2 = b as AttackPhase; Miss miss = new Miss(CardSuit.Diamond, 2); p1.handCards.Add(attack); p1.handCards.Add(miss); p1.health = 1; Player[] p = new LiuBei[1]; p[0] = p1; // AttackPhase produces responsePhase ret = b.advance(null, game); Phase c = ret.pop(); ResponsePhase c_ = c as ResponsePhase; Assert.IsInstanceOfType(a.responseAbilityAction(new AbilityAction(attack, p), game), typeof(PhaseList)); }