public void GetPart()
        {
            var map = new DocumentMap<string>();
            map.Add(5, "test");

            var relativeRanges = map.GetRelativeRange(new Range(1, 7));
            Assert.AreEqual(1, relativeRanges.Count);
            Assert.AreEqual("test", relativeRanges[0].Source);
            Assert.AreEqual(new Range(1,5), relativeRanges[0].Range);
        }
        public void GetEmpty()
        {
            var map = new DocumentMap<string>();
            map.Add(5, "test");
            map.Add(0, "test3");
            map.Add(2, "test2");

            var relativeRanges = map.GetRelativeRange(new Range(1, 7));
            Assert.AreEqual(3, relativeRanges.Count);

            Assert.AreEqual("test3", relativeRanges[1].Source);
            Assert.AreEqual(new Range(0,0), relativeRanges[1].Range);
        }
 public void InvalidDoesNotCrash()
 {
     var map = new DocumentMap<string>();
     Assert.AreEqual(0, map.GetRelativeRange(new Range(-5, 0)).Count);
 }
 public void EmptyIsEmptyAndNotNull()
 {
     var map = new DocumentMap<string>();
     Assert.AreEqual(0, map.GetRelativeRange(new Range(0, 7)).Count);
 }