public void View_is_readonly() { IList<int> trans = new ObservableView<int>(source); trans.IsReadOnly.ShouldBe(true); Should.Throw<InvalidOperationException>(() => trans.Add(3)); Should.Throw<InvalidOperationException>(() => trans.Clear()); Should.Throw<InvalidOperationException>(() => trans.Remove(3)); Should.Throw<InvalidOperationException>(() => trans.RemoveAt(0)); Should.Throw<InvalidOperationException>(() => trans.Insert(0, 3)); Should.Throw<InvalidOperationException>(() => trans[0] = 3); }