public void MergeThreeWithOneSuperSetAndOneDisjointTimeLineCollectionReturnsTwoTimeLine()
        {
            var id = InstrumentIdentifiers.Null();

            id.Sedol = "1234567";
            var merger   = new TimeLineMerger <BmllTimeBarQuery>();
            var queryOne = new BmllTimeBarQuery(
                new DateTime(2019, 01, 01),
                new DateTime(2019, 03, 01),
                id);
            var queryTwo = new BmllTimeBarQuery(
                new DateTime(2019, 01, 02),
                new DateTime(2019, 02, 01),
                id);
            var queryThree = new BmllTimeBarQuery(
                new DateTime(2020, 01, 02),
                new DateTime(2020, 02, 01),
                id);

            var result = merger.Merge(new[] { queryOne, queryTwo, queryThree });

            Assert.IsNotNull(result);
            Assert.Contains(queryOne, result.ToList());
            Assert.Contains(queryThree, result.ToList());
            Assert.AreEqual(result.Count, 2);
        }
        public void MergeEmptyTimeLineCollectionIsEmpty()
        {
            var merger = new TimeLineMerger <BmllTimeBarQuery>();

            var result = merger.Merge(new BmllTimeBarQuery[0]);

            Assert.IsEmpty(result);
            Assert.IsNotNull(result);
        }
        public void MergeSingleTimeLineCollectionReturnsSingleTimeLine()
        {
            var merger = new TimeLineMerger <BmllTimeBarQuery>();
            var query  = new BmllTimeBarQuery(
                new DateTime(2019, 01, 01),
                new DateTime(2019, 03, 01),
                InstrumentIdentifiers.Null());

            var result = merger.Merge(new BmllTimeBarQuery[] { query });

            Assert.IsNotNull(result);
            Assert.Contains(query, result.ToList());
            Assert.AreEqual(result.Count, 1);
        }
        public void MergeTwoWithBothIdenticalTimeLineCollectionReturnsOneTimeLine()
        {
            var id = InstrumentIdentifiers.Null();

            id.Sedol = "1234567";
            var merger   = new TimeLineMerger <BmllTimeBarQuery>();
            var queryOne = new BmllTimeBarQuery(
                new DateTime(2019, 01, 01),
                new DateTime(2019, 03, 01),
                id);
            var queryTwo = new BmllTimeBarQuery(
                new DateTime(2019, 01, 01),
                new DateTime(2019, 03, 01),
                id);

            var result = merger.Merge(new[] { queryOne, queryTwo });

            Assert.IsNotNull(result);
            Assert.Contains(queryOne, result.ToList());
            Assert.AreEqual(result.Count, 1);
        }