public void packageBidPassAckTest() { BidBase b = new PassBid(Board.Instance.Me); PackageBid pkgb = new PackageBid(b); byte [] bs = pkgb.getAckMessage(); PackageBid pkgbRec = new PackageBid(PackageBase.getMessageFromAck(bs)); Assert.AreEqual(EnPackageType.BID, pkgb.type); Assert.AreSame(Board.Instance.Me, pkgb.bid.bidder); Assert.AreEqual(b, pkgbRec.bid); }
public void packageBidPassTest() { BidBase b = new PassBid(Board.Instance.Me); PackageBid pkgb = new PackageBid(b); byte [] bs = pkgb.getMessage(); PackageBid pkgbRec = new PackageBid(bs); Assert.AreEqual(EnPackageType.BID, pkgb.type); Assert.AreSame(Board.Instance.Me, pkgb.bid.bidder); Assert.True(b.Equals(pkgbRec.bid)); }
public void setup() { Board.Instance.Reset(); using (TestRandom rnd = new TestRandom()) Board.Instance.InitializeMaster(new string[] { "A", "B", "C", "D", "E" }, 2, rnd); //il mazziere è C _null1 = null; _null2 = null; _pass1 = new PassBid(Board.Instance.AllPlayers [0]); _pass2 = new PassBid(Board.Instance.AllPlayers [1]); _normalBid1 = new NormalBid(Board.Instance.AllPlayers [0], EnNumbers.ASSE, 70); _normalBid2 = new NormalBid(Board.Instance.AllPlayers [1], EnNumbers.DUE, 61); _normalBid3 = new NormalBid(Board.Instance.AllPlayers [2], EnNumbers.DUE, 70); _normalBid4 = new NormalBid(Board.Instance.AllPlayers [2], EnNumbers.DUE, 70); _carichi1 = new CarichiBid(Board.Instance.AllPlayers [0], 61); _carichi2 = new CarichiBid(Board.Instance.AllPlayers [0], 70); _carichi3 = new CarichiBid(Board.Instance.AllPlayers [0], 70); }