public void GivenFixtureWhenEpochInvalidGreaterThanCurrentEpochAndMultipleEpochChangeReasonsThenIsEpochValidReturnsFalse() { // //Arrange // var fixtureDelta = new Fixture { Epoch = 4, LastEpochChangeReason = new[] { (int)EpochChangeReason.StartTime, (int)EpochChangeReason.Participants } }; int currentEpoch = 3; var fixtureValidation = new FixtureValidation(); // //Act // bool isEpochValid = fixtureValidation.IsEpochValid( fixtureDelta, currentEpoch); // //Assert // Assert.IsFalse(isEpochValid); }
public void GivenFixtureWhenEpochValidGreaterThanCurrentEpochButOnlyBecauseOfStartTimeEpochChangeReasonThenIsEpochValidReturnsTrue() { // //Arrange // var fixtureDelta = new Fixture { Epoch = 4, LastEpochChangeReason = new[] { (int)EpochChangeReason.StartTime } }; int currentEpoch = 3; var fixtureValidation = new FixtureValidation(); // //Act // bool isEpochValid = fixtureValidation.IsEpochValid( fixtureDelta, currentEpoch); // //Assert // Assert.IsTrue(isEpochValid); }
public void GivenFixtureWhenEpochInvalidGreaterThanCurrentEpochAndFixtureStartTimeChangedFalseThenIsEpochValidReturnsFalse() { // //Arrange // var fixtureDelta = new Fixture { Epoch = 4 }; int currentEpoch = 3; var fixtureValidation = new FixtureValidation(); // //Act // bool isEpochValid = fixtureValidation.IsEpochValid( fixtureDelta, currentEpoch); // //Assert // Assert.IsFalse(isEpochValid); }
public void GivenFixtureWhenEpochInvalidLowerThanCurrentEpochThenIsEpochValidReturnsFalse() { // //Arrange // var fixtureDelta = new Fixture { Epoch = 3 }; int currentEpoch = 4; var fixtureValidation = new FixtureValidation(); // //Act // bool isEpochValid = fixtureValidation.IsEpochValid( fixtureDelta, currentEpoch); // //Assert // Assert.IsFalse(isEpochValid); }
public void GivenFixtureWhenEpochValidSameAsCurrentEpochThenIsEpochValidReturnsTrue() { // //Arrange // var fixtureDelta = new Fixture { Epoch = 4 }; int currentEpoch = 4; var fixtureValidation = new FixtureValidation(); // //Act // bool isEpochValid = fixtureValidation.IsEpochValid( fixtureDelta, currentEpoch); // //Assert // Assert.IsTrue(isEpochValid); }