Implemented numeber of multisession options, reading, modifying tree, and a number of improvements
This commit is contained in:
@ -105,6 +105,20 @@ static void test_iso_volume_set_volume_id()
|
||||
iso_volume_free(volume);
|
||||
}
|
||||
|
||||
static void test_iso_volume_get_volume_id()
|
||||
{
|
||||
struct iso_volume *volume;
|
||||
|
||||
volume = iso_volume_new("volume_id", "publisher_id", "data_preparer_id");
|
||||
CU_ASSERT_STRING_EQUAL( iso_volume_get_volume_id(volume), "volume_id" );
|
||||
|
||||
char *volid = "new volume id";
|
||||
iso_volume_set_volume_id(volume, volid);
|
||||
CU_ASSERT_STRING_EQUAL( iso_volume_get_volume_id(volume), "new volume id" );
|
||||
|
||||
iso_volume_free(volume);
|
||||
}
|
||||
|
||||
static void test_iso_volume_set_publisher_id()
|
||||
{
|
||||
struct iso_volume *volume;
|
||||
@ -121,6 +135,20 @@ static void test_iso_volume_set_publisher_id()
|
||||
iso_volume_free(volume);
|
||||
}
|
||||
|
||||
static void test_iso_volume_get_publisher_id()
|
||||
{
|
||||
struct iso_volume *volume;
|
||||
|
||||
volume = iso_volume_new("volume_id", "publisher_id", "data_preparer_id");
|
||||
CU_ASSERT_STRING_EQUAL( iso_volume_get_publisher_id(volume), "publisher_id" );
|
||||
|
||||
char *pubid = "new publisher id";
|
||||
iso_volume_set_publisher_id(volume, pubid);
|
||||
CU_ASSERT_STRING_EQUAL( iso_volume_get_publisher_id(volume), "new publisher id" );
|
||||
|
||||
iso_volume_free(volume);
|
||||
}
|
||||
|
||||
static void test_iso_volume_set_data_preparer_id()
|
||||
{
|
||||
struct iso_volume *volume;
|
||||
@ -137,6 +165,20 @@ static void test_iso_volume_set_data_preparer_id()
|
||||
iso_volume_free(volume);
|
||||
}
|
||||
|
||||
static void test_iso_volume_get_data_preparer_id()
|
||||
{
|
||||
struct iso_volume *volume;
|
||||
|
||||
volume = iso_volume_new("volume_id", "publisher_id", "data_preparer_id");
|
||||
CU_ASSERT_STRING_EQUAL( iso_volume_get_data_preparer_id(volume), "data_preparer_id" );
|
||||
|
||||
char *dpid = "new data preparer id";
|
||||
iso_volume_set_data_preparer_id(volume, dpid);
|
||||
CU_ASSERT_STRING_EQUAL( iso_volume_get_data_preparer_id(volume), "new data preparer id" );
|
||||
|
||||
iso_volume_free(volume);
|
||||
}
|
||||
|
||||
static void test_iso_volume_set_system_id()
|
||||
{
|
||||
struct iso_volume *volume;
|
||||
@ -153,6 +195,20 @@ static void test_iso_volume_set_system_id()
|
||||
iso_volume_free(volume);
|
||||
}
|
||||
|
||||
static void test_iso_volume_get_system_id()
|
||||
{
|
||||
struct iso_volume *volume;
|
||||
|
||||
volume = iso_volume_new("volume_id", "publisher_id", "data_preparer_id");
|
||||
CU_ASSERT_PTR_NULL(iso_volume_get_system_id(volume));
|
||||
|
||||
char *sysid = "new system id";
|
||||
iso_volume_set_system_id(volume, sysid);
|
||||
CU_ASSERT_STRING_EQUAL( iso_volume_get_system_id(volume), "new system id" );
|
||||
|
||||
iso_volume_free(volume);
|
||||
}
|
||||
|
||||
static void test_iso_volume_set_application_id()
|
||||
{
|
||||
struct iso_volume *volume;
|
||||
@ -169,6 +225,50 @@ static void test_iso_volume_set_application_id()
|
||||
iso_volume_free(volume);
|
||||
}
|
||||
|
||||
static void test_iso_volume_get_application_id()
|
||||
{
|
||||
struct iso_volume *volume;
|
||||
|
||||
volume = iso_volume_new("volume_id", "publisher_id", "data_preparer_id");
|
||||
CU_ASSERT_PTR_NULL(iso_volume_get_application_id(volume));
|
||||
|
||||
char *appid = "new application id";
|
||||
iso_volume_set_application_id(volume, appid);
|
||||
CU_ASSERT_STRING_EQUAL( iso_volume_get_application_id(volume), "new application id" );
|
||||
|
||||
iso_volume_free(volume);
|
||||
}
|
||||
|
||||
static void test_iso_volume_set_copyright_file_id()
|
||||
{
|
||||
struct iso_volume *volume;
|
||||
|
||||
volume = iso_volume_new("volume_id", "publisher_id", "data_preparer_id");
|
||||
CU_ASSERT_PTR_NULL(volume->copyright_file_id);
|
||||
|
||||
char *copid = "new copyright id";
|
||||
iso_volume_set_copyright_file_id(volume, copid);
|
||||
CU_ASSERT_STRING_EQUAL( volume->copyright_file_id, "new copyright id" );
|
||||
|
||||
/* check string was strdup'ed */
|
||||
CU_ASSERT_PTR_NOT_EQUAL( volume->copyright_file_id, copid );
|
||||
iso_volume_free(volume);
|
||||
}
|
||||
|
||||
static void test_iso_volume_get_copyright_file_id()
|
||||
{
|
||||
struct iso_volume *volume;
|
||||
|
||||
volume = iso_volume_new("volume_id", "publisher_id", "data_preparer_id");
|
||||
CU_ASSERT_PTR_NULL(iso_volume_get_copyright_file_id(volume));
|
||||
|
||||
char *copid = "new copyright id";
|
||||
iso_volume_set_copyright_file_id(volume, copid);
|
||||
CU_ASSERT_STRING_EQUAL( iso_volume_get_copyright_file_id(volume), "new copyright id" );
|
||||
|
||||
iso_volume_free(volume);
|
||||
}
|
||||
|
||||
static void test_iso_volume_set_abstract_file_id()
|
||||
{
|
||||
struct iso_volume *volume;
|
||||
@ -185,6 +285,20 @@ static void test_iso_volume_set_abstract_file_id()
|
||||
iso_volume_free(volume);
|
||||
}
|
||||
|
||||
static void test_iso_volume_get_abstract_file_id()
|
||||
{
|
||||
struct iso_volume *volume;
|
||||
|
||||
volume = iso_volume_new("volume_id", "publisher_id", "data_preparer_id");
|
||||
CU_ASSERT_PTR_NULL(iso_volume_get_abstract_file_id(volume));
|
||||
|
||||
char *absid = "new abstract id";
|
||||
iso_volume_set_abstract_file_id(volume, absid);
|
||||
CU_ASSERT_STRING_EQUAL(iso_volume_get_abstract_file_id(volume), "new abstract id");
|
||||
|
||||
iso_volume_free(volume);
|
||||
}
|
||||
|
||||
static void test_iso_volume_set_biblio_file_id()
|
||||
{
|
||||
struct iso_volume *volume;
|
||||
@ -201,6 +315,20 @@ static void test_iso_volume_set_biblio_file_id()
|
||||
iso_volume_free(volume);
|
||||
}
|
||||
|
||||
static void test_iso_volume_get_biblio_file_id()
|
||||
{
|
||||
struct iso_volume *volume;
|
||||
|
||||
volume = iso_volume_new("volume_id", "publisher_id", "data_preparer_id");
|
||||
CU_ASSERT_PTR_NULL(iso_volume_get_biblio_file_id(volume));
|
||||
|
||||
char *bibid = "new biblio id";
|
||||
iso_volume_set_biblio_file_id(volume, bibid);
|
||||
CU_ASSERT_STRING_EQUAL(iso_volume_get_biblio_file_id(volume), "new biblio id");
|
||||
|
||||
iso_volume_free(volume);
|
||||
}
|
||||
|
||||
static void test_iso_volset_new()
|
||||
{
|
||||
struct iso_volume *volume;
|
||||
@ -228,11 +356,20 @@ void add_volume_suite()
|
||||
CU_add_test(pSuite, "test of iso_volume_new_with_root()", test_iso_volume_new_with_root);
|
||||
CU_add_test(pSuite, "test of iso_volume_get_root()", test_iso_volume_get_root);
|
||||
CU_add_test(pSuite, "test of iso_volume_set_volume_id()", test_iso_volume_set_volume_id);
|
||||
CU_add_test(pSuite, "test of iso_volume_get_volume_id()", test_iso_volume_get_volume_id);
|
||||
CU_add_test(pSuite, "test of iso_volume_set_publisher_id()", test_iso_volume_set_publisher_id);
|
||||
CU_add_test(pSuite, "test of iso_volume_get_publisher_id()", test_iso_volume_get_publisher_id);
|
||||
CU_add_test(pSuite, "test of iso_volume_set_data_preparer_id()", test_iso_volume_set_data_preparer_id);
|
||||
CU_add_test(pSuite, "test of iso_volume_get_data_preparer_id()", test_iso_volume_get_data_preparer_id);
|
||||
CU_add_test(pSuite, "test of iso_volume_set_system_id()", test_iso_volume_set_system_id);
|
||||
CU_add_test(pSuite, "test of iso_volume_get_system_id()", test_iso_volume_get_system_id);
|
||||
CU_add_test(pSuite, "test of iso_volume_set_application_id()", test_iso_volume_set_application_id);
|
||||
CU_add_test(pSuite, "test of iso_volume_get_application_id()", test_iso_volume_get_application_id);
|
||||
CU_add_test(pSuite, "test of iso_volume_set_copyright_file_id()", test_iso_volume_set_copyright_file_id);
|
||||
CU_add_test(pSuite, "test of iso_volume_get_copyright_file_id()", test_iso_volume_get_copyright_file_id);
|
||||
CU_add_test(pSuite, "test of iso_volume_set_abstract_file_id()", test_iso_volume_set_abstract_file_id);
|
||||
CU_add_test(pSuite, "test of iso_volume_get_abstract_file_id()", test_iso_volume_get_abstract_file_id);
|
||||
CU_add_test(pSuite, "test of iso_volume_set_biblio_file_id()", test_iso_volume_set_biblio_file_id);
|
||||
CU_add_test(pSuite, "test of iso_volume_get_biblio_file_id()", test_iso_volume_get_biblio_file_id);
|
||||
CU_add_test(pSuite, "test of iso_volset_new()", test_iso_volset_new);
|
||||
}
|
||||
|
Reference in New Issue
Block a user