Exemplo n.º 1
0
        public void RoundtripEntityDefinition()
        {
            var expected = new EntityDefinition
            {
                Id       = Guid.NewGuid().ToString(),
                AvatarId = Guid.NewGuid().ToString(),
                Mass     = 1f,
            };

            var xml = expected.ToString();

            Assert.IsFalse(string.IsNullOrEmpty(xml));

            var actual = EntityDefinition.FromString(xml);

            Assert.IsNotNull(actual);
            Assert.AreEqual(expected.Id, actual.Id);
            Assert.AreEqual(expected.AvatarId, actual.AvatarId);
            Assert.AreEqual(expected.Mass, actual.Mass);
        }