Ejemplo n.º 1
0
        public void RemoveAtRemovesItemByIndex()
        {
            var wrappedList = new List <Uri>();
            var destList    = new ListAdapter <string, Uri>(
                str => new Uri(str),
                uri => uri.ToString(),
                (str, uri) => string.Equals(str, uri?.ToString()),
                wrappedList)
            {
                "http://maps.google.com",
                "http://www.twitter.com"
            };

            wrappedList.Count.Should().Be(2);

            destList.RemoveAt(0);

            wrappedList.Count.Should().Be(1);
            wrappedList[0].ToString().Should().Be("http://www.twitter.com/");
            destList[0].Should().Be(wrappedList[0].ToString());
        }
Ejemplo n.º 2
0
        public void RemoveAt()
        {
            _adapter.RemoveAt(0);

            Assert.That(_innerList, Is.EqualTo(new[] { 2, 3 }));
        }