Ejemplo n.º 1
0
        public void RemoveAllTest()
        {
            var a = new[] { new EClass(1), new EClass(2), new EClass(3) };
            var l = new EventedList <EClass>(a);

            l.RemoveAll(e => e.Prop < 3);
            Assert.That(l.Count, Is.EqualTo(1));
            Assert.That(l[0].Prop, Is.EqualTo(3));
        }
Ejemplo n.º 2
0
        public void TestRemoveAll()
        {
            Init();

            m_uut.AddRange(new string[] { "Bob", "Mary", "Sue" });
            m_uut.RemoveAll(delegate(string s) { return(s.Length.Equals(3)); });

            Assert.IsTrue(m_uut[0].Equals("Mary"));
            Assert.IsTrue(m_responses.Equals("m_uut_AboutToAddItems System.String[] | m_uut_AddedItems System.String[] | m_uut_ContentsChanged | m_uut_AboutToRemoveItems System.Predicate`1[System.String] | m_uut_RemovedItems System.Predicate`1[System.String] | m_uut_ContentsChanged | "));
            Console.WriteLine(m_responses);
        }