public void IncludesEntityGroup() { var component = new FrigateAIComponent(""); JsonElement deserialized = JsonSerializer.Deserialize <JsonElement>(component.Save()); Assert.Equal(FrigateAIComponent.ENTITY_GROUP, deserialized.GetProperty("EntityGroup").GetString()); }
public void SerializesAndDeserializesCorrectly() { var component = new FrigateAIComponent("groupid"); string saved = component.Save(); var newComponent = FrigateAIComponent.Create(saved); Assert.Equal(component.ActivationGroupId, newComponent.ActivationGroupId); Assert.Equal(component.ReverserCooldown, newComponent.ReverserCooldown); Assert.Equal(component.CurrentReverserCooldown, newComponent.CurrentReverserCooldown); }