Пример #1
0
        public void Object_Array()
        {
            var sut = new MockObject[5];

            Assert.AreEqual(sut.Length, 5);
            sut[1] = new MockObject {
                F = 5
            };
            Assert.AreEqual(sut[1].F, 5);
        }
Пример #2
0
        public void Object_Array_Initializer()
        {
            var sut = new MockObject[] { new MockObject {
                                             F = 12
                                         }, new MockObject {
                                             F = 13
                                         } };

            Assert.AreEqual(sut.Length, 2);
            Assert.AreEqual(sut[1].F, 13);
        }