public void CanMove1StepToLeftByConstructorWithCollectionAndSmallerVisualSize() { var collection = new DualObserableCollection <int>(new List <int> { 1, 2, 3, 4, 5 }, 2); Assert.IsTrue(collection.CanMove1StepToLeft); }
public void ConstructorWithFullParameters(int visualSize) { var source = new List <int>() { 1, 2, 3 }; var collection = new DualObserableCollection <int>(source, visualSize); Assert.AreEqual(collection.VisualSize, visualSize); }
public void MoveStepsToLeft(int steps) { var collection = new DualObserableCollection <int>(new List <int> { 1, 2, 3, 4, 5 }, 2); collection.MoveStepsToLeft(steps); var firstVisible = collection.VisualElements.First(); var lastVisibile = collection.VisualElements.Last(); Assert.AreEqual(4, firstVisible, "First visual element should be 4"); Assert.AreEqual(5, lastVisibile, "Last visual element should be 5"); }
public void CanNotMove1StepToRightJustAfterConstruction(ICollection <int> source, int visualSize) { var collection = new DualObserableCollection <int>(source, visualSize); Assert.IsFalse(collection.CanMove1StepToRight); }
public void CanNotMove1StepToLeftIfCollectionEmpty() { var collection = new DualObserableCollection <int>(); Assert.IsFalse(collection.CanMove1StepToLeft); }
public void SetVisualSizeInConstructor() { var collection = new DualObserableCollection <int>(5); Assert.AreEqual(collection.VisualSize, 5); }
public void DefaultConstructorShouldSetVisualSizeTo0() { var collection = new DualObserableCollection <int>(); Assert.AreEqual(collection.VisualSize, 0); }