public void TestSetPropertySuccess() { var c = new InvariantClass(); c.MyProperty = "Value"; Assert.AreEqual("Value", c.MyProperty); }
public void TestSetFieldSuccess() { var c = new InvariantClass(); c.SetMyInt(4); Assert.AreEqual(4, c.GetMyInt()); c.SetMyInt(6); Assert.AreEqual(6, c.GetMyInt()); }
public void TestSetPropertyViolateInvariantCtor() { var c = new InvariantClass { MyProperty = null }; }
public void TestSetPropertyViolateInvariant() { var c = new InvariantClass(); c.MyProperty = null; }
public void TestSetFieldViolateInvariant() { var c = new InvariantClass(); c.SetMyInt(5); }