public void RemoveAttributeThatWasNotThereShouldDoNothing() { //Arrange var s = new SeatInfo { SeatAttributes = new[] { SeatAttributeEnum.Dealer } }; //Act s.RemoveAttribute(SeatAttributeEnum.FirstTalker); //Assert Assert.AreEqual(1, s.SeatAttributes.Length); Assert.IsFalse(s.HasAttribute(SeatAttributeEnum.FirstTalker)); Assert.IsTrue(s.HasAttribute(SeatAttributeEnum.Dealer)); }
public void AddAttributeThatWasNotThereShouldAdd() { //Arrange var s = new SeatInfo { SeatAttributes = new[] { SeatAttributeEnum.Dealer } }; //Act s.AddAttribute(SeatAttributeEnum.FirstTalker); //Assert Assert.AreEqual(2, s.SeatAttributes.Length); Assert.IsTrue(s.HasAttribute(SeatAttributeEnum.Dealer)); Assert.IsTrue(s.HasAttribute(SeatAttributeEnum.FirstTalker)); }
public void SeatNotContainingAttribute() { //Arrange var s = new SeatInfo { SeatAttributes = new[] { SeatAttributeEnum.Dealer } }; //Act //Assert Assert.IsFalse(s.HasAttribute(SeatAttributeEnum.FirstTalker)); }
public void RemoveAttributeThatWasAlreadyThereShouldRemove() { //Arrange var s = new SeatInfo { SeatAttributes = new[] { SeatAttributeEnum.Dealer } }; //Act s.RemoveAttribute(SeatAttributeEnum.Dealer); //Assert Assert.AreEqual(0, s.SeatAttributes.Length); Assert.IsFalse(s.HasAttribute(SeatAttributeEnum.Dealer)); }
public void AddAttributeThatWasAlreadyThereShouldDoNothing() { //Arrange var s = new SeatInfo { SeatAttributes = new[] { SeatAttributeEnum.Dealer } }; //Act s.AddAttribute(SeatAttributeEnum.Dealer); //Assert Assert.AreEqual(1, s.SeatAttributes.Length); Assert.IsTrue(s.HasAttribute(SeatAttributeEnum.Dealer)); }
public void MovingDealerToFirstTalker() { //Arrange var sDealer = new SeatInfo { SeatAttributes = new[] { SeatAttributeEnum.Dealer } }; var sFirstTalker = new SeatInfo { SeatAttributes = new[] { SeatAttributeEnum.FirstTalker } }; var sCurrentPlayer = new SeatInfo { SeatAttributes = new[] { SeatAttributeEnum.CurrentPlayer, SeatAttributeEnum.BigBlind } }; var sBigBlind = new SeatInfo { SeatAttributes = new[] { SeatAttributeEnum.BigBlind } }; var seats = new[] { sDealer, sFirstTalker, sCurrentPlayer, sBigBlind }; //Act seats.MoveAttributeTo(sFirstTalker, SeatAttributeEnum.Dealer); //Assert Assert.IsFalse(sDealer.HasAttribute(SeatAttributeEnum.Dealer)); Assert.IsTrue(sFirstTalker.HasAttribute(SeatAttributeEnum.Dealer)); }