Ejemplo n.º 1
0
        public void IncludesEntityGroup()
        {
            var         component    = new CarrierAIComponent("");
            JsonElement deserialized = JsonSerializer.Deserialize <JsonElement>(component.Save());

            Assert.Equal(CarrierAIComponent.ENTITY_GROUP, deserialized.GetProperty("EntityGroup").GetString());
        }
Ejemplo n.º 2
0
        public void SerializesAndDeserializesCorrectly()
        {
            var    component = new CarrierAIComponent("groupid");
            string saved     = component.Save();

            var newComponent = CarrierAIComponent.Create(saved);

            Assert.Equal(component.ActivationGroupId, newComponent.ActivationGroupId);
            Assert.Equal(component.FlakCooldown, newComponent.FlakCooldown);
            Assert.Equal(component.CurrentFlakCooldown, newComponent.CurrentFlakCooldown);
            Assert.Equal(component.LaunchTable, newComponent.LaunchTable);
        }