Files
tgstation-server/tests/Tgstation.Server.Host.Tests/Components/Events/TestEventScriptAttribute.cs
T
Jordan Brown 0c0e7e2590 Events refactor
- Add Components.Events namespace, move all event stuff there.
- Add README.
- Add EventScriptAttribute, all EventTypes must now have an associated script name.
- Added unit tests.
2020-06-01 12:34:47 -04:00

22 lines
543 B
C#

using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
namespace Tgstation.Server.Host.Components.Events.Tests
{
/// <summary>
/// Tests for the <see cref="EventScriptAttribute"/> <see langword="class"/>.
/// </summary>
[TestClass]
public sealed class TestEventScriptAttribute
{
[TestMethod]
public void TestConstruction()
{
Assert.ThrowsException<ArgumentNullException>(() => new EventScriptAttribute(null));
var test = new EventScriptAttribute("test");
Assert.AreEqual("test", test.ScriptName);
}
}
}