public void SerializeIntegerTest(int val) { Integer inte = new Integer(val); using (StreamWriter sw = new StreamWriter($"ser_{nameof(SerializeIntegerTest)}.txt")) { inte.Serialize(sw); } using (StreamReader sr = new StreamReader($"ser_{nameof(SerializeIntegerTest)}.txt")) { Integer inte1 = Integer.Deserialize(sr); Assert.IsTrue(inte1.Equals(inte)); } }