mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-31 00:50:45 +01:00
- 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.
22 lines
543 B
C#
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);
|
|
}
|
|
}
|
|
}
|