예제 #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));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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));
        }
예제 #5
0
        public void AddDisjointFrames_ThrowsArgumentException()
        {
            var x = new ViewTimeFrame(0, 100);
            var y = new ViewTimeFrame(200, 300);

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