public void AsReadOnly() { Assert.AreEqual(_array.Rank, _readOnly.Rank); Assert.IsTrue(_array.Equals(_readOnly)); _array[0, 1] = "foo value"; Assert.IsTrue(_array.Equals(_readOnly)); _array[0, 1] = "second value"; Assert.IsTrue(_array.Equals(_readOnly)); }
public void Equals_should_return_true_for_equal_string_arrays() { var first = new StringArray(); first.Collection = new[] { "one", "two", "three" }; var second = new StringArray(); second.Collection = new[] { "one", "two", "three" }; var result = first.Equals(second); Assert.True(result); }