public void GivenOtherIsNull_ThrowArgumentNullException() { // arrange var actual = new InitiativePassSlot(); // act var results = actual.CompareTo(null); // assert Assert.Fail("ArgumentNullException should have been thrown"); }
public void GivenBothHaveNotActedAndBothHaveSameInitiative_ThenEqual() { // arrange var other = new InitiativePassSlot() { HasActed = false, CurrentInitiative = 5 }; var actual = new InitiativePassSlot() { HasActed = false, CurrentInitiative = 5 }; // act var results = actual.CompareTo(other); // assert Assert.AreEqual(0, results); }
public void GivenBothHaveNotActedAndOtherHasAHigherInitiative_ThenOtherPrecedesThis() { // arrange var other = new InitiativePassSlot() { HasActed = false, CurrentInitiative = 8 }; var actual = new InitiativePassSlot() { HasActed = false, CurrentInitiative = 3 }; // act var results = actual.CompareTo(other); // assert Assert.AreEqual(1, results); }
public void GivenThisHasNotActedAndOtherHas_ThenThisPrecedesOther() { // arrange var other = new InitiativePassSlot() { HasActed = true }; var actual = new InitiativePassSlot() { HasActed = false }; // act var results = actual.CompareTo(other); // assert Assert.AreEqual(-1, results); }