Exemplo n.º 1
0
        public void AsReadOnlyCollection_ObjectList()
        {
            var objectList = new ObjectList <Customer> {
                _customer1, _customer2
            };
            var readOnlyCollection = objectList.AsReadOnlyCollection();

            Assert.That(readOnlyCollection, Is.InstanceOf(typeof(ReadOnlyCollection <Customer>)));
            Assert.That(readOnlyCollection, Is.EqualTo(new[] { _customer1, _customer2 }));
        }