public void SerializeTest() { var serializer = new BinaryCompressSerializer(); var obj = new BinaryCryptoData { Age = 12, Name = "huangxd", Birthday = DateTime.Parse("1982-9-20") }; var bytes = serializer.Serialize(obj); Assert.IsNotNull(bytes); }
public void SerializeUseMd5Test() { var crypt = CryptographyFactory.Create("md5"); var serializer = new BinaryCryptoSerializer(crypt); var obj = new BinaryCryptoData { Age = 12, Name = "huangxd", Birthday = DateTime.Parse("1982-9-20") }; var bytes = serializer.Serialize(obj); Assert.IsNotNull(bytes); }