Exemple #1
0
        public void AsReadOnlyShouldReturnReadOnlyCollection()
        {
            //Arange
            var a = array.AsReadOnly();
            //Act
            var exceptedResult = 20;

            //Assert
            Assert.AreEqual(exceptedResult, a[1]);
        }
 /// <summary>
 /// Makes the List as a ReadOnlyCollection.
 /// </summary>
 /// <returns>List its values ​​as <typeparamref name="ReadOnlyCollection"/> of type <typeparamref name="T"/>.</returns>
 public ReadOnlyCollection <T> AsReadOnly()
 {
     return(array.AsReadOnly());
 }