public void ShouldNotFailIfTryingToRemoveNotExistingSequence() { var group = new SequenceGroup(); group.Add(new Sequence()); group.Add(new Sequence()); group.Remove(new Sequence()); }
public void Should_Not_Fail_If_Trying_To_Remove_NotExisting_Sequence() { var group = new SequenceGroup(); group.Add(new Sequence()); group.Add(new Sequence()); group.Remove(new Sequence()); }
public void ShouldRemoveSequenceFromGroup() { var sequenceThree = new Sequence(3L); var sequenceSeven = new Sequence(7L); var sequenceGroup = new SequenceGroup(); sequenceGroup.Add(sequenceSeven); sequenceGroup.Add(sequenceThree); Assert.AreEqual(sequenceThree.Value, sequenceGroup.Value); Assert.IsTrue(sequenceGroup.Remove(sequenceThree)); Assert.AreEqual(sequenceSeven.Value, sequenceGroup.Value); Assert.AreEqual(1, sequenceGroup.Size); }
public void Should_Remove_Sequence_From_Group_Where_It_Been_Added_Multiple_Times() { var sequenceThree = new Sequence(3L); var sequenceSeven = new Sequence(7L); var sequenceGroup = new SequenceGroup(); sequenceGroup.Add(sequenceThree); sequenceGroup.Add(sequenceSeven); sequenceGroup.Add(sequenceThree); Assert.Equal(sequenceThree.GetValue(), sequenceGroup.GetMinimumSequence()); Assert.True(sequenceGroup.Remove(sequenceThree)); Assert.Equal(sequenceSeven.GetValue(), sequenceGroup.GetMinimumSequence()); Assert.Equal(1, sequenceGroup.Size()); }