CustomAttributeTests: use channels enum

This commit is contained in:
vis2k 2020-03-01 11:41:25 +01:00
parent b440130647
commit d9036a6a79
2 changed files with 25 additions and 14 deletions

View File

@ -21,11 +21,11 @@ public void CommandAttributeTest()
{
CommandAttribute attrib = new CommandAttribute();
Assert.That(attrib.channel == 0);
Assert.That(attrib.channel == Channels.DefaultReliable);
attrib.channel = 1;
attrib.channel = Channels.DefaultUnreliable;
Assert.That(attrib.channel == 1);
Assert.That(attrib.channel == Channels.DefaultUnreliable);
}
[Test]
@ -33,11 +33,11 @@ public void ClientRPCAttributeTest()
{
ClientRpcAttribute attrib = new ClientRpcAttribute();
Assert.That(attrib.channel == 0);
Assert.That(attrib.channel == Channels.DefaultReliable);
attrib.channel = 1;
attrib.channel = Channels.DefaultUnreliable;
Assert.That(attrib.channel == 1);
Assert.That(attrib.channel == Channels.DefaultUnreliable);
}
[Test]
@ -45,9 +45,9 @@ public void TargetRPCAttributeTest()
{
TargetRpcAttribute attrib = new TargetRpcAttribute();
Assert.That(attrib.channel == 0);
Assert.That(attrib.channel == Channels.DefaultReliable);
attrib.channel = 1;
attrib.channel = Channels.DefaultUnreliable;
Assert.That(attrib.channel == 1);
}
@ -57,11 +57,11 @@ public void SyncEventAttributeTest()
{
SyncEventAttribute attrib = new SyncEventAttribute();
Assert.That(attrib.channel == 0);
Assert.That(attrib.channel == Channels.DefaultReliable);
attrib.channel = 1;
attrib.channel = Channels.DefaultUnreliable;
Assert.That(attrib.channel == 1);
Assert.That(attrib.channel == Channels.DefaultUnreliable);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fce3141f0dc99464cba7328003e18a6e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: