LONGBOW_TEST_CASE(Global, ccnxPortal_Open)
{
    TestData *data = longBowTestCase_GetClipBoardData(testCase);
    CCNxPortal *portal = ccnxPortalFactory_CreatePortal(data->factory, TEST_STACK);
   
    parcObjectTesting_AssertAcquire(portal);
   
    ccnxPortal_Release(&portal);
}
Exemple #2
0
LONGBOW_TEST_CASE(CreateAcquireRelease, CreateRelease)
{
    PARCSortedList *instance = parcSortedList_Create();
    assertNotNull(instance, "Expected non-null result from parcSortedList_Create();");

    parcObjectTesting_AssertAcquire(instance);

    parcSortedList_Release(&instance);
    assertNull(instance, "Expected null result from parcSortedList_Release();");
}
LONGBOW_TEST_CASE(CreateRelease, CreateRelease)
{
    CCNxPortalFactory *factory = (CCNxPortalFactory *) longBowTestCase_GetClipBoardData(testCase);

    CCNxPortalAttributes *attributes = NULL;
    CCNxPortalStack *actual =
        ccnxPortalStack_Create(factory,
                               attributes,
                               _mockStart,
                               _mockStop,
                               _mockRead,
                               _mockSend,
                               _mockListen,
                               _mockIgnore,
                               _mockGetFileId,
                               _mockSetAttributes,
                               _mockGetAttributes,
                               parcMemory_Allocate(10),
                               parcMemory_DeallocateImpl);

    parcObjectTesting_AssertAcquire(actual);

    ccnxPortalStack_Release(&actual);
}