Esempio n. 1
0
        public void UnionCommutative()
        {
            var x = new ViewTimeFrame(0, 100);
            var y = new ViewTimeFrame(50, 150);

            Assert.AreEqual(x.Union(y), y.Union(x));
        }
Esempio n. 2
0
        /// <summary>
        /// Make sure taking the union of one frame and a frame completely contained within
        /// the first frame is equal to the first frame.
        /// </summary>
        public void AddFrameWithinFrame()
        {
            var x = new ViewTimeFrame(0, 300);
            var y = new ViewTimeFrame(100, 200);

            Assert.AreEqual(x.Union(y), new ViewTimeFrame(0, 300));
        }
Esempio n. 3
0
        public void AddAdjacentFrames()
        {
            var x = new ViewTimeFrame(0, 100);
            var y = new ViewTimeFrame(100, 200);

            Assert.AreEqual(x.Union(y), new ViewTimeFrame(0, 200));
        }
Esempio n. 4
0
        public void AddOverlappingFrames()
        {
            var x = new ViewTimeFrame(0, 100);
            var y = new ViewTimeFrame(50, 150);

            Assert.AreEqual(x.Union(y), new ViewTimeFrame(0, 150));
        }
Esempio n. 5
0
        public void AddDisjointFrames_ThrowsArgumentException()
        {
            var x = new ViewTimeFrame(0, 100);
            var y = new ViewTimeFrame(200, 300);

            Assert.ThrowsException <ArgumentException>(() =>
                                                       x.Union(y)
                                                       );
        }