mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
remove unnecessary test
This commit is contained in:
parent
39fd4bec56
commit
034fed74a1
@ -1,57 +0,0 @@
|
|||||||
using NUnit.Framework;
|
|
||||||
using Mirror.Authenticators;
|
|
||||||
|
|
||||||
namespace Mirror.Tests
|
|
||||||
{
|
|
||||||
[TestFixture]
|
|
||||||
public class BasicAuthenticatorTest
|
|
||||||
{
|
|
||||||
[Test]
|
|
||||||
public void AuthRequestMessageTest()
|
|
||||||
{
|
|
||||||
// try setting value with constructor
|
|
||||||
AuthRequestMessage message = new AuthRequestMessage
|
|
||||||
{
|
|
||||||
authUsername = "abc",
|
|
||||||
authPassword = "123"
|
|
||||||
};
|
|
||||||
Assert.That(message.authUsername, Is.EqualTo("abc"));
|
|
||||||
Assert.That(message.authPassword, Is.EqualTo("123"));
|
|
||||||
|
|
||||||
// serialize
|
|
||||||
NetworkWriter writer = new NetworkWriter();
|
|
||||||
message.Serialize(writer);
|
|
||||||
byte[] writerData = writer.ToArray();
|
|
||||||
|
|
||||||
// try deserialize
|
|
||||||
AuthRequestMessage fresh = new AuthRequestMessage();
|
|
||||||
fresh.Deserialize(new NetworkReader(writerData));
|
|
||||||
Assert.That(fresh.authUsername, Is.EqualTo("abc"));
|
|
||||||
Assert.That(fresh.authPassword, Is.EqualTo("123"));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void AuthResponseMessageTest()
|
|
||||||
{
|
|
||||||
// try setting value with constructor
|
|
||||||
AuthResponseMessage message = new AuthResponseMessage
|
|
||||||
{
|
|
||||||
code = 123,
|
|
||||||
message = "abc"
|
|
||||||
};
|
|
||||||
Assert.That(message.code, Is.EqualTo(123));
|
|
||||||
Assert.That(message.message, Is.EqualTo("abc"));
|
|
||||||
|
|
||||||
// serialize
|
|
||||||
NetworkWriter writer = new NetworkWriter();
|
|
||||||
message.Serialize(writer);
|
|
||||||
byte[] writerData = writer.ToArray();
|
|
||||||
|
|
||||||
// try deserialize
|
|
||||||
AuthResponseMessage fresh = new AuthResponseMessage();
|
|
||||||
fresh.Deserialize(new NetworkReader(writerData));
|
|
||||||
Assert.That(fresh.code, Is.EqualTo(123));
|
|
||||||
Assert.That(fresh.message, Is.EqualTo("abc"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 14742e780e150894b983a54d36a3cdb6
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
Loading…
Reference in New Issue
Block a user