Ejemplo n.º 1
0
        public void Test_Contains()
        {
            var seq = new SequentialSearch <Byte, Char>();

            seq.Add(1, 'A');
            seq.Add(2, 'B');

            Assert.True(seq.Contains(1));
            Assert.True(seq.Contains(2));
        }
Ejemplo n.º 2
0
        public void Test_Add_Get()
        {
            var seq = new SequentialSearch <Byte, Char>();

            seq.Add(1, 'A');

            Assert.Equal('A', seq.Get(1));
        }
Ejemplo n.º 3
0
        public void Test_Delete()
        {
            var seq = new SequentialSearch <Byte, Char>();

            seq.Add(1, 'A');
            seq.Delete(1);

            Assert.False(seq.Contains(1));
        }
Ejemplo n.º 4
0
        private SequentialSearch <Byte, Char> CreateFullSequencialSearch()
        {
            SequentialSearch <Byte, Char> seq = new SequentialSearch <Byte, Char>();

            seq.Add(1, 'A');
            seq.Add(2, 'B');
            seq.Add(3, 'C');
            seq.Add(4, 'D');
            seq.Add(5, 'E');
            seq.Add(6, 'F');

            return(seq);
        }