Пример #1
0
        public void LengthAndCountShowCurrentSize()
        {
            dynamic array = new Clay(new ArrayBehavior());

            Assert.That(array.Length, Is.EqualTo(0));
            Assert.That(array.Count, Is.EqualTo(0));
            Assert.That(array.Length(), Is.EqualTo(0));
            Assert.That(array.Count(), Is.EqualTo(0));

            array.Add("Alpha");
            array.Add("Beta");

            Assert.That(array.Length, Is.EqualTo(2));
            Assert.That(array.Count, Is.EqualTo(2));
            Assert.That(array.Length(), Is.EqualTo(2));
            Assert.That(array.Count(), Is.EqualTo(2));
        }