Example #1
0
        public void ContainsReturnsTrueForStringElements()
        {
            string[] values = new[] { "Neo", "Morpheus", "Trinity", "Agent Smith", "Oracle" };
            var      list   = new RecentCollection <string>(10);

            foreach (string s in values)
            {
                list.Add(s);
            }

            foreach (string s in values)
            {
                Assert.IsTrue(list.Contains(s));
            }
        }
Example #2
0
        public void ContainsReturnsTrueForInt32Elements()
        {
            int[] values = new[] { int.MinValue, -100, 0, 100, int.MaxValue };
            var   list   = new RecentCollection <int>(10);

            foreach (int s in values)
            {
                list.Add(s);
            }

            foreach (int s in values)
            {
                Assert.IsTrue(list.Contains(s));
            }
        }
Example #3
0
        public void ContainsReturnsTrueForStringElements()
        {
            string[] values = new[] {"Neo", "Morpheus", "Trinity", "Agent Smith", "Oracle"};
            var list = new RecentCollection<string>(10);
            foreach (string s in values)
            {
                list.Add(s);
            }

            foreach (string s in values)
            {
                Assert.IsTrue(list.Contains(s));
            }
        }
Example #4
0
        public void ContainsReturnsTrueForInt32Elements()
        {
            int[] values = new[] { int.MinValue, -100, 0, 100, int.MaxValue };
            var list = new RecentCollection<int>(10);
            foreach (int s in values)
            {
                list.Add(s);
            }

            foreach (int s in values)
            {
                Assert.IsTrue(list.Contains(s));
            }
        }