コード例 #1
0
        public void Core_IList_FillRange()
        {
            var fullList  = new ComplexList();
            var emptyList = new ComplexList();

            emptyList.Clear();
            Assert.IsTrue(emptyList.Count == 0);
            emptyList.FillRange(fullList);
            Assert.IsTrue(emptyList.Count == fullList.Count);

            emptyList.Clear();
            Assert.IsTrue(emptyList.Count == 0);
            emptyList.FillRange(fullList.Select(x => x));
            Assert.IsTrue(emptyList.Count == fullList.Count);
        }
コード例 #2
0
        public void List_Fill()
        {
            var fullList  = new ComplexList();
            var emptyList = new ComplexList();

            emptyList.Clear();
            Assert.IsTrue(emptyList.Count == 0);
            emptyList.FillRange(fullList);
            Assert.IsTrue(emptyList.Count == fullList.Count);
        }