//first pre timestamp
Date pre = Calendar.getInstance().getTime();
ConnectedResponse simpleConnectedObjectResponse = client.simpleConnectedObject(ctx);
Heap simpleConnectedObjectHeap = protocol == TestConnectedObjectsProtocolEnum.IN_PROCESS ? new ImmutableHeap(simpleConnectedObjectResponse.getHeap().getUri(),simpleConnectedObjectResponse.getHeap(),true) : simpleConnectedObjectResponse.getHeap();
Subscription simpleConnectedObjectSub = simpleConnectedObjectResponse.getSubscription();
String subId1 = getSubscriptionId(simpleConnectedObjectSub, socketProtocol);
//try subscription log check
{
//Test Data
int stepCount = 0;
TestResult tr = new TestResult();
tr.setDescription("Testing a new subscription for a simple connected object is logged (redundant if protocol=IN_PROCESS)");
assertEquals(tr, stepCount++, true, isLogged(file, subId1, simpleObjectUri, startReason, pre, socketProtocol), "Subscription not logged for " + simpleObjectUri);
results.add(tr);
}
ConnectedResponse simpleConnectedListResponse = client.simpleConnectedList(ctx);
Heap simpleConnectedListHeap = protocol == TestConnectedObjectsProtocolEnum.IN_PROCESS ? new ImmutableHeap(simpleConnectedListResponse.getHeap().getUri(),simpleConnectedListResponse.getHeap(),true) : simpleConnectedListResponse.getHeap();
Subscription simpleConnectedListSub = simpleConnectedListResponse.getSubscription();
String subId2 = getSubscriptionId(simpleConnectedListSub, socketProtocol);
//try subscription log check
{
//Test Data
int stepCount = 0;
TestResult tr = new TestResult();
tr.setDescription("Testing a new subscription for a simple connected object is logged (redundant if protocol=IN_PROCESS)");
assertEquals(tr, stepCount++, true, isLogged(file, subId2, simpleListUri, startReason, pre, socketProtocol), "Subscription not logged for " + simpleListUri);
results.add(tr);
}
ConnectedResponse complexConnectedObjectResponse = client.complexConnectedObject(ctx);
Heap complexConnectedObjectHeap = protocol == TestConnectedObjectsProtocolEnum.IN_PROCESS ? new ImmutableHeap(complexConnectedObjectResponse.getHeap().getUri(),complexConnectedObjectResponse.getHeap(),true) : complexConnectedObjectResponse.getHeap();
Subscription complexConnectedObjectSub = complexConnectedObjectResponse.getSubscription();
String subId3 = getSubscriptionId(complexConnectedObjectSub, socketProtocol);
//try subscription log check
{
//Test Data