public void Value_SetPropertyToReadOnlyAndTryToSetIt_ThrowsReadOnlyException() { var context = new Context("context"); var prop = new Property<string>("propertyname", context, CultureInfo.InvariantCulture); prop.MakeReadOnly(); Assert.IsTrue(prop.IsReadOnly); Assert.Throws<ReadOnlyException>(() => prop.Value = "Hello world"); }