Files
RobustToolbox/Robust.Shared.IntegrationTests/Serialization/DataStructTest.cs
T
PJB3005 788e9386fd Split up test project
Robust.UnitTesting was both ALL tests for RT, and also API surface for content tests.

Tests are now split into separate projects as appropriate, and the API side has also been split off.
2025-12-16 01:36:53 +01:00

28 lines
647 B
C#

using NUnit.Framework;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.Markdown.Mapping;
namespace Robust.UnitTesting.Shared.Serialization;
internal sealed partial class DataStructTest : OurSerializationTest
{
[DataDefinition]
public partial struct DefaultIntDataStruct
{
public int A = 5;
public DefaultIntDataStruct()
{
}
}
[Test]
public void DefaultIntDataStructTest()
{
var mapping = new MappingDataNode();
var val = Serialization.Read<DefaultIntDataStruct>(mapping);
Assert.That(val.A, Is.EqualTo(5));
}
}