public void UnionCommutative() { var x = new ViewTimeFrame(0, 100); var y = new ViewTimeFrame(50, 150); Assert.AreEqual(x.Union(y), y.Union(x)); }
/// <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)); }
public void AddAdjacentFrames() { var x = new ViewTimeFrame(0, 100); var y = new ViewTimeFrame(100, 200); Assert.AreEqual(x.Union(y), new ViewTimeFrame(0, 200)); }
public void AddOverlappingFrames() { var x = new ViewTimeFrame(0, 100); var y = new ViewTimeFrame(50, 150); Assert.AreEqual(x.Union(y), new ViewTimeFrame(0, 150)); }
public void AddDisjointFrames_ThrowsArgumentException() { var x = new ViewTimeFrame(0, 100); var y = new ViewTimeFrame(200, 300); Assert.ThrowsException <ArgumentException>(() => x.Union(y) ); }