Files
RobustToolbox/Robust.UnitTesting/Shared/Serialization/NetSerializableAttribute_Test.cs
T
SilverandGitHub 25926a17b7 Renames SS14.* to Robust.* (#793)
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
2019-04-15 20:24:59 -06:00

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)}.");
}
}
}
}