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 System.Collections.Immutable; |
|
2 |
using Libplanet.KeyStore; |
|
3 |
using Xunit; |
|
4 |
using static Libplanet.Tests.TestUtils; |
|
5 |
|
|
6 |
namespace Libplanet.Tests.KeyStore |
|
7 |
{
|
|
8 |
public class IncorrectPassphraseExceptionTest |
|
9 |
{
|
|
10 |
[Fact]
|
|
11 |
public void Constructor() |
|
12 | 1 |
{
|
13 | 1 |
ImmutableArray<byte> |
14 | 1 |
expectedMac = new byte[] { 0x00, 0x01, 0x02, 0x03 }.ToImmutableArray(), |
15 | 1 |
inputMac = new byte[] { 0x04, 0x05, 0x06, 0x07 }.ToImmutableArray(); |
16 | 1 |
var e = new IncorrectPassphraseException( |
17 | 1 |
"Some message.", |
18 | 1 |
"paramName", |
19 | 1 |
expectedMac, |
20 | 1 |
inputMac
|
21 | 1 |
);
|
22 | 1 |
Assert.StartsWith( |
23 | 1 |
"Some message.\nExpected MAC: 00010203\nInput MAC: 04050607", |
24 | 1 |
e.Message |
25 | 1 |
);
|
26 | 1 |
Assert.Equal("paramName", e.ParamName); |
27 | 1 |
AssertBytesEqual(expectedMac, e.ExpectedMac); |
28 | 1 |
AssertBytesEqual(inputMac, e.InputMac); |
29 | 1 |
}
|
30 |
}
|
|
31 |
}
|
Read our documentation on viewing source code .