Exemple #1
0
        public void CanMove1StepToLeftByConstructorWithCollectionAndSmallerVisualSize()
        {
            var collection = new DualObserableCollection <int>(new List <int> {
                1, 2, 3, 4, 5
            }, 2);

            Assert.IsTrue(collection.CanMove1StepToLeft);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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");
        }
Exemple #4
0
        public void CanNotMove1StepToRightJustAfterConstruction(ICollection <int> source, int visualSize)
        {
            var collection = new DualObserableCollection <int>(source, visualSize);

            Assert.IsFalse(collection.CanMove1StepToRight);
        }
Exemple #5
0
        public void CanNotMove1StepToLeftIfCollectionEmpty()
        {
            var collection = new DualObserableCollection <int>();

            Assert.IsFalse(collection.CanMove1StepToLeft);
        }
Exemple #6
0
        public void SetVisualSizeInConstructor()
        {
            var collection = new DualObserableCollection <int>(5);

            Assert.AreEqual(collection.VisualSize, 5);
        }
Exemple #7
0
        public void DefaultConstructorShouldSetVisualSizeTo0()
        {
            var collection = new DualObserableCollection <int>();

            Assert.AreEqual(collection.VisualSize, 0);
        }