Navigation | Overlay |
---|---|
t Navigate files | h Toggle hits |
y Change url to tip of branch | m Toggle misses |
b / v Jump to prev/next hit line | p Toggle partial |
z / x Jump to prev/next missed or partial line | 1..9 Toggle flags |
shift + o Open current page in GitHub | a Toggle all on |
/ or ? Show keyboard shortcuts dialog | c Toggle context lines or commits |
1 |
using Libplanet.Stun.Messages; |
|
2 |
using Xunit; |
|
3 |
|
|
4 |
namespace Libplanet.Stun.Tests.Messages |
|
5 |
{
|
|
6 |
public class RefreshRequestTest |
|
7 |
{
|
|
8 |
[Fact]
|
|
9 |
public void EncodeToBytes() |
|
10 | 1 |
{
|
11 | 1 |
var request = new RefreshRequest(777) |
12 | 1 |
{
|
13 | 1 |
TransactionId = new byte[] |
14 | 1 |
{
|
15 | 1 |
0xaf, 0x9d, 0x6b, 0xa5, 0x71, 0x17, 0xd7, 0xf2, 0x0a, 0x3a, |
16 | 1 |
0x94, 0x7b, |
17 | 1 |
},
|
18 | 1 |
};
|
19 | 1 |
Assert.Equal( |
20 | 1 |
new byte[] |
21 | 1 |
{
|
22 | 1 |
0x00, 0x04, 0x00, 0x10, 0x21, 0x12, 0xa4, 0x42, 0xaf, 0x9d, 0x6b, |
23 | 1 |
0xa5, 0x71, 0x17, 0xd7, 0xf2, 0x0a, 0x3a, 0x94, 0x7b, 0x00, 0x0d, |
24 | 1 |
0x00, 0x04, 0x00, 0x00, 0x03, 0x09, 0x80, 0x28, 0x00, 0x04, 0x72, |
25 | 1 |
0x1c, 0x63, 0x88, |
26 | 1 |
},
|
27 | 1 |
request.Encode(new TestStunContext())); |
28 | 1 |
}
|
29 |
}
|
|
30 |
}
|
Read our documentation on viewing source code .