public void TestStructListWithProperties() { SizeWithProperties size1 = new SizeWithProperties(); size1.Width = 800; size1.Height = 600; SizeWithProperties size2 = new SizeWithProperties(); size2.Width = 1024; size2.Height = 768; List <SizeWithProperties> list1 = new List <SizeWithProperties>(); list1.Add(size1); list1.Add(size2); byte[] bytes = _serializer.Serialize(list1); List <SizeWithProperties> list2 = _serializer.Deserialize <List <SizeWithProperties> >(bytes); if (!_compare.Compare(list1, list2)) { throw new Exception(_compare.DifferencesString); } }
public void TestStructWithProperties() { SizeWithProperties size1 = new SizeWithProperties(); size1.Width = 800; size1.Height = 600; byte[] bytes = _serializer.Serialize(size1); SizeWithProperties size2 = _serializer.Deserialize <SizeWithProperties>(bytes); if (!_compare.Compare(size1, size2)) { throw new Exception(_compare.DifferencesString); } }