mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-04 02:57:08 +02:00
RobustToolbox projects should be named Robust.* This PR changes the RobustToolbox projects from SS14.* to Robust.* Updates SS14.* prefixes/namespaces to Robust.* Updates SpaceStation14.sln to RobustToolbox.sln Updates MSBUILD/SS14.* to MSBUILD/Robust.* Updates CSProject and MSBuild references for the above Updates git_helper.py Removes Runserver and Runclient as they are unusable
34 lines
983 B
C#
34 lines
983 B
C#
using System;
|
|
using NUnit.Framework;
|
|
using Robust.Shared.Interfaces.Reflection;
|
|
using Robust.Shared.IoC;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Robust.UnitTesting.Shared.Serialization
|
|
{
|
|
[TestFixture]
|
|
class NetSerializableAttribute_Test : RobustUnitTest
|
|
{
|
|
private IReflectionManager _reflection;
|
|
|
|
[OneTimeSetUp]
|
|
public void TestFixtureSetup()
|
|
{
|
|
_reflection = IoCManager.Resolve<IReflectionManager>();
|
|
}
|
|
|
|
[Test]
|
|
public void AllNetSerializableObjectsHaveSerializableAttribute()
|
|
{
|
|
var types = _reflection.FindTypesWithAttribute<NetSerializableAttribute>();
|
|
|
|
foreach (var type in types)
|
|
{
|
|
Assert.IsTrue(Attribute.IsDefined(type, typeof(NetSerializableAttribute), true),
|
|
$"{type.FullName} has {nameof(NetSerializableAttribute)}, but not the required {nameof(SerializableAttribute)}.");
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|