public void NewToken18Test() { PvpToken token18 = new PvpToken(PvpVersion.Version18); Assert.AreEqual(PvpVersion.Version18, token18.Version); var userId = new PvpAttributeUserId(); userId.Value = "abc"; token18.Attributes.Add(userId); Assert.AreEqual(PvpVersion.Version18, userId.CurrentVersion); Assert.AreEqual("abc", userId.Value); Assert.AreEqual("X-AUTHENTICATE-UserID", userId.GetHeaderName()); Assert.AreEqual("1.8", token18.GetAttributeValue(PvpAttributes.VERSION)); }
public void NewToken20Test() { PvpToken token20 = new PvpToken(PvpVersion.Version20); Assert.AreEqual(PvpVersion.Version20, token20.Version); var userId = new PvpAttributeUserId(); userId.Value = "abc"; token20.Attributes.Add(userId); Assert.AreEqual(PvpVersion.Version20, userId.CurrentVersion); Assert.AreEqual("abc", userId.Value); Assert.AreEqual("X-PVP-USERID", userId.GetHeaderName()); Assert.AreEqual("2.0", token20.GetAttributeValue(PvpAttributes.VERSION)); }