public void ComplexEnumStringsInts() { //Arrange int vala = 123; int valb = 545; string valsa = "String1"; string valsb = "ZXCVFDSW"; eLocateBy loc = eLocateBy.ByName; NewPayLoad pl = new NewPayLoad("ComplexEnumStringsInts"); pl.AddValue(vala); pl.AddValue(valb); pl.AddValue(valsa); pl.AddValue(valsb); pl.AddEnumValue(loc); pl.ClosePackage(); // Act byte[] b = pl.GetPackage(); NewPayLoad pl2 = new NewPayLoad(b); int vala2 = pl2.GetValueInt(); int valb2 = pl2.GetValueInt(); string valsa2 = pl2.GetValueString(); string valsb2 = pl2.GetValueString(); string Loc2 = pl2.GetValueEnum(); //Assert Assert.AreEqual(vala, vala2); Assert.AreEqual(valb, valb2); Assert.AreEqual(valsa, valsa2); Assert.AreEqual(valsb, valsb2); Assert.AreEqual(loc.ToString(), Loc2); }