public void Serialize(IXunitSerializationInfo info) { info.AddValue("Name", "John"); info.AddValue("Age", 30); info.AddValue("IsMarried", true); }
public void Deserialize(IXunitSerializationInfo info) { string name = info.GetValueIn this example, the Deserialize method uses the GetValue method to retrieve the values added in the previous example from the Xunit serialization info object. The values are casted to their original types (string, int, and bool) and assigned to variables. The Xunit package is used in unit testing frameworks for .NET languages.("Name"); int age = info.GetValue ("Age"); bool isMarried = info.GetValue ("IsMarried"); }