public void CheckForCycles_FRN49() { var context = new FudgeContext(); var serializer = new FudgeSerializer(context); var testObj = new ClassWithCycles(); testObj.Child = new ClassWithCycles(); serializer.SerializeToMsg(testObj); // Doesn't throw because no cycles testObj.Child = testObj; Assert.Throws<FudgeRuntimeException>(() => serializer.SerializeToMsg(testObj)); }
public void CheckForCycles_FRN49() { var context = new FudgeContext(); var serializer = new FudgeSerializer(context); var testObj = new ClassWithCycles(); testObj.Child = new ClassWithCycles(); serializer.SerializeToMsg(testObj); // Doesn't throw because no cycles testObj.Child = testObj; Assert.Throws <FudgeRuntimeException>(() => serializer.SerializeToMsg(testObj)); }