public void DeserializeTestCaseShouldReturnExpected() { List <byte> data = data1(); DynamicObjectInformation info = serializer.Deserialize(data); DynamicObjectInformation expectedInfo = PlayerInformation1(); Assert.That(info.Equals(expectedInfo)); }
public void SerializeThenDeserializeShouldPreserveOriginal() { // Serialize some information DynamicObjectInformation info = PlayerInformation1(); List <byte> data = serializer.Serialize(info); // Make sure the serializer isn't just spitting out the same thing Assert.That(!info.Equals(data)); // Deserialize the result DynamicObjectInformation resultingInfo = serializer.Deserialize(data); // Check the information is the same as the original Assert.That(resultingInfo.Equals(info)); }
public void EqualsItselfShouldReturnTrue() { DynamicObjectInformation test = new DynamicObjectInformation(new Vector2(), new Vector2(), 0); Assert.That(test.Equals(test)); }
public void EqualsNullShouldReturnFalse() { DynamicObjectInformation test = new DynamicObjectInformation(new Vector2(), new Vector2(), 0); Assert.That(!test.Equals(null)); }