/
BnetProtocolPackersTest.vb
77 lines (76 loc) · 2.54 KB
/
BnetProtocolPackersTest.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Imports Strilbrary.Collections
Imports Strilbrary.Time
Imports Strilbrary.Values
Imports Microsoft.VisualStudio.TestTools.UnitTesting
Imports System.Collections.Generic
Imports Tinker
Imports Tinker.Bnet
Imports Tinker.Bnet.Protocol
<TestClass()>
Public Class BnetProtocolPackersTest
<TestMethod()>
Public Sub MakeAccountLogOnBeginTest()
Using rng = New Security.Cryptography.RNGCryptoServiceProvider()
MakeUserAuthenticationBegin(ClientCredentials.GeneratedFrom("test", "password", rng))
End Using
End Sub
<TestMethod()>
Public Sub MakeAccountLogOnFinishTest()
MakeUserAuthenticationFinish(CByte(1).Repeated(20))
End Sub
<TestMethod()>
Public Sub MakeAuthenticationBeginTest()
MakeAuthenticationBegin(majorVersion:=24, localIPAddress:=Net.IPAddress.Loopback)
End Sub
<TestMethod()>
Public Sub MakeAuthenticationFinishTest()
MakeAuthenticationFinish(version:=ByteRist(1, 2, 3, 4),
revisionCheckResponse:=1,
clientCDKeySalt:=2,
cdKeyOwner:="test",
exeInformation:="info",
productAuthentication:=New ProductCredentialPair(
"EDKBRTRXG88Z9V8M84HY2XVW7N".ToWC3CDKeyCredentials(clientSalt:={1, 2, 3, 4}, serverSalt:={1, 2, 3, 4}),
"M68YC4278JJXXVJMKRP8ETN4TC".ToWC3CDKeyCredentials(clientSalt:={1, 2, 3, 4}, serverSalt:={1, 2, 3, 4})))
End Sub
<TestMethod()>
Public Sub MakeChatCommandTest()
MakeChatCommand("test")
End Sub
<TestMethod()>
Public Sub MakeCloseGame3Test()
MakeCloseGame3()
End Sub
<TestMethod()>
Public Sub MakeCreateGame3Test()
MakeCreateGame3(SharedTestObjects.TestDesc)
End Sub
<TestMethod()>
Public Sub MakeEnterChatTest()
MakeEnterChat()
End Sub
<TestMethod()>
Public Sub MakeGetFileTimeTest()
MakeGetFileTime("test", 1)
End Sub
<TestMethod()>
Public Sub MakeJoinChannelTest()
MakeJoinChannel(JoinChannelType.FirstJoin, "test")
End Sub
<TestMethod()>
Public Sub MakeNetGamePortTest()
MakeNetGamePort(6112)
End Sub
<TestMethod()>
Public Sub MakePingTest()
MakePing(52)
End Sub
<TestMethod()>
Public Sub MakeQueryGamesListTest()
MakeQueryGamesList()
End Sub
<TestMethod()>
Public Sub MakeWardenTest()
MakeWarden(ByteRist(0))
End Sub
End Class