public void PublicProperty() { var instance = new Lesson1TestClass1 {Name = "test1"}; var result = PassThroughProtobuf(instance); Assert.AreEqual("test1",result.Name); }
public void PublicField() { var instance = new Lesson1TestClass1 { Phone = "test2" }; var result = PassThroughProtobuf(instance); Assert.AreEqual("test2", result.Phone); }
public void PublicReadonlyField() { var instance = new Lesson1TestClass1(); // we keep the id to compare it later. var id = instance.Id; var result = PassThroughProtobuf(instance); Assert.AreEqual(id, result.Id); }