This commit is contained in:
akwizgran
2017-11-16 10:29:18 +00:00
committed by Torsten Grote
parent 27328afe3c
commit 5fa6b0ca1c
109 changed files with 2087 additions and 3450 deletions

View File

@@ -706,39 +706,29 @@ public class IntroductionIntegrationTest
@Test
public void testModifiedTransportProperties() throws Exception {
testModifiedResponse(new StateVisitor() {
@Override
public boolean visit(BdfDictionary response) {
BdfDictionary tp = response.getDictionary(TRANSPORT, null);
tp.put("fakeId",
BdfDictionary.of(new BdfEntry("fake", "fake")));
response.put(TRANSPORT, tp);
return false;
}
testModifiedResponse(response -> {
BdfDictionary tp = response.getDictionary(TRANSPORT, null);
tp.put("fakeId", BdfDictionary.of(new BdfEntry("fake", "fake")));
response.put(TRANSPORT, tp);
return false;
});
}
@Test
public void testModifiedTimestamp() throws Exception {
testModifiedResponse(new StateVisitor() {
@Override
public boolean visit(BdfDictionary response) {
long timestamp = response.getLong(TIME, 0L);
response.put(TIME, timestamp + 1);
return false;
}
testModifiedResponse(response -> {
long timestamp = response.getLong(TIME, 0L);
response.put(TIME, timestamp + 1);
return false;
});
}
@Test
public void testModifiedEphemeralPublicKey() throws Exception {
testModifiedResponse(new StateVisitor() {
@Override
public boolean visit(BdfDictionary response) {
KeyPair keyPair = crypto.generateSignatureKeyPair();
response.put(E_PUBLIC_KEY, keyPair.getPublic().getEncoded());
return true;
}
testModifiedResponse(response -> {
KeyPair keyPair = crypto.generateSignatureKeyPair();
response.put(E_PUBLIC_KEY, keyPair.getPublic().getEncoded());
return true;
});
}