public void SelfConversionTest()
 {
     SelfConverter expected = new SelfConverter();
     Serializer s = new Serializer(typeof(SelfConverter));
     string result = s.Serialize(expected);
     SelfConverter actual = (SelfConverter)s.Deserialize(result);
     Assert.AreEqual(expected, actual, "Selfconversion failed");
 }
Пример #2
0
 public override bool Equals(object obj)
 {
     if (obj is SelfConverter)
     {
         SelfConverter other = (SelfConverter)obj;
         return(this.num == other.num);
     }
     else
     {
         return(false);
     }
 }