public void Binary_SerializationAndDeserialization_ForAClassObject_Test(Cat cat, string filepath) { CustomSerializer <Cat> serializer = new CustomSerializer <Cat>(); serializer.SerializeToBinary(cat, filepath); Cat t_cat = serializer.DeserializeFromBinary(filepath); Assert.Equal(cat, t_cat); }
public void Binary_SerializationAndDeserialization_ForACollection_Test(CatsCollection <Cat> cats, string filepath) { CustomSerializer <CatsCollection <Cat> > serializer = new CustomSerializer <CatsCollection <Cat> >(); serializer.SerializeToBinary(cats, filepath); CatsCollection <Cat> t_cats = serializer.DeserializeFromBinary(filepath); Assert.Equal(cats, t_cats); }