You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-16 07:06:30 +09:00
transferred from trunk/Generation3 of lidgren-network
This commit is contained in:
24
UnitTests/MiscTests.cs
Normal file
24
UnitTests/MiscTests.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
|
||||
using Lidgren.Network;
|
||||
|
||||
namespace UnitTests
|
||||
{
|
||||
public static class MiscTests
|
||||
{
|
||||
public static void Run(NetPeer peer)
|
||||
{
|
||||
NetPeerConfiguration config = new NetPeerConfiguration("Test");
|
||||
|
||||
config.EnableMessageType(NetIncomingMessageType.UnconnectedData);
|
||||
if (config.IsMessageTypeEnabled(NetIncomingMessageType.UnconnectedData) == false)
|
||||
throw new NetException("setting enabled message types failed");
|
||||
|
||||
config.SetMessageTypeEnabled(NetIncomingMessageType.UnconnectedData, false);
|
||||
if (config.IsMessageTypeEnabled(NetIncomingMessageType.UnconnectedData) == true)
|
||||
throw new NetException("setting enabled message types failed");
|
||||
|
||||
Console.WriteLine("Misc tests OK");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user