예제 #1
0
        public void ContainsRemoveAndIndexOfFunctionAsNormalListWouldDictate()
        {
            dynamic array = new Clay(new ArrayBehavior());

            array.Add("a", "b", "c", "d");

            Assert.That(array.Contains("b"), Is.True);
            Assert.That(array.Contains("e"), Is.False);
            Assert.That(array.IndexOf("b"), Is.EqualTo(1));
            Assert.That(array.IndexOf("e"), Is.EqualTo(-1));
            Assert.That(array.Remove("b"), Is.True);
            Assert.That(array.Remove("e"), Is.False);

            Assert.That(array.Contains("b"), Is.False);
            Assert.That(array.IndexOf("b"), Is.EqualTo(-1));
            Assert.That(array.Remove("b"), Is.False);
        }