public void ReadOnlyTest()
{
// Declare variables
const string testValue = "new value that shouldn't exist";
string originalValue, actualValue;
IniEntry iniEntry = ModelBaseTestHelper.CreateIniEntryObject();
// Test whether the object can be set to read-only
originalValue = iniEntry.Value;
iniEntry.SetReadOnly(true);
iniEntry.Value = testValue;
actualValue = iniEntry.Value;
Assert.AreEqual(originalValue, actualValue);
// Test whether the object can be set to edit mode again
iniEntry.SetReadOnly(false);
iniEntry.Value = testValue;
actualValue = iniEntry.Value;
Assert.AreEqual(testValue, actualValue);
}
#endregion