您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

24 行
890 B

using LobbyRelaySample.Auth;
using NUnit.Framework;
namespace Test
{
public class AuthTests
{
[Test]
public void IdentityBasicSubidentity()
{
string value = null;
int count = 0;
SubIdentity testIdentity = new SubIdentity();
testIdentity.onChanged += (si) => { value = si.GetContent("key1"); count++; };
testIdentity.SetContent("key1", "newValue1");
Assert.AreEqual(1, count, "Content changed once.");
Assert.AreEqual("newValue1", value, "Should not have to do anything to receive updated content from a set.");
testIdentity.SetContent("key2", "newValue2");
Assert.AreEqual(2, count, "Content changed twice.");
Assert.AreEqual("newValue1", value, "Contents should not affect different keys.");
}
}
}