Esempio n. 1
0
int main(){
	fixtureSetup();
	resetTestCount();

	testStarted("test_insert_element");
	setup();
		test_insert_element();
	tearDown();
	testEnded();
	testStarted("test_insert_multiple_elements");
	setup();
		test_insert_multiple_elements();
	tearDown();
	testEnded();
	testStarted("test_interns_grows_beyond_capacity");
	setup();
		test_interns_grows_beyond_capacity();
	tearDown();
	testEnded();
	testStarted("test_should_not_insert_at_index_beyond_length");
	setup();
		test_should_not_insert_at_index_beyond_length();
	tearDown();
	testEnded();
	testStarted("test_should_not_insert_at_negative_index");
	setup();
		test_should_not_insert_at_negative_index();
	tearDown();
	testEnded();
	testStarted("test_insert_at_middle_should_shift_the_elements");
	setup();
		test_insert_at_middle_should_shift_the_elements();
	tearDown();
	testEnded();
	testStarted("test_should_not_insert_when_list_is_null");
	setup();
		test_should_not_insert_when_list_is_null();
	tearDown();
	testEnded();
	testStarted("test_add_element");
	setup();
		test_add_element();
	tearDown();
	testEnded();
	testStarted("test_remove_element");
	setup();
		test_remove_element();
	tearDown();
	testEnded();
	testStarted("test_remove_element_from_empty_list");
	setup();
		test_remove_element_from_empty_list();
	tearDown();
	testEnded();
	testStarted("test_removes_and_shifts_elements_left");
	setup();
		test_removes_and_shifts_elements_left();
	tearDown();
	testEnded();
	testStarted("test_should_get_index_of_search_element");
	setup();
		test_should_get_index_of_search_element();
	tearDown();
	testEnded();
	testStarted("test_should_get_minus_1_if_element_not_found");
	setup();
		test_should_get_minus_1_if_element_not_found();
	tearDown();
	testEnded();
	testStarted("test_iterator_tells_that_next_data_is_present");
	setup();
		test_iterator_tells_that_next_data_is_present();
	tearDown();
	testEnded();
	testStarted("test_iterator_tells_that_next_data_is_not_present");
	setup();
		test_iterator_tells_that_next_data_is_not_present();
	tearDown();
	testEnded();
	testStarted("test_iterator_gives_the_data_of_next_index");
	setup();
		test_iterator_gives_the_data_of_next_index();
	tearDown();
	testEnded();
	testStarted("test_prints_data_of_each_element");
	setup();
		test_prints_data_of_each_element();
	tearDown();
	testEnded();

	summarizeTestCount();
	fixtureTearDown();
	return 0;
}
Esempio n. 2
0
int main(){
	fixtureSetup();
	resetTestCount();

	testStarted("test_insert_element");
	setup();
		test_insert_element();
	tearDown();
	testEnded();
	testStarted("test_insert_multiple_elements");
	setup();
		test_insert_multiple_elements();
	tearDown();
	testEnded();
	testStarted("test_interns_grows_beyond_capacity");
	setup();
		test_interns_grows_beyond_capacity();
	tearDown();
	testEnded();
	testStarted("test_should_not_insert_at_index_beyond_length");
	setup();
		test_should_not_insert_at_index_beyond_length();
	tearDown();
	testEnded();
	testStarted("test_should_not_insert_at_negative_index");
	setup();
		test_should_not_insert_at_negative_index();
	tearDown();
	testEnded();
	testStarted("test_insert_at_middle_should_shift_the_elements");
	setup();
		test_insert_at_middle_should_shift_the_elements();
	tearDown();
	testEnded();
	testStarted("test_should_not_insert_when_list_is_null");
	setup();
		test_should_not_insert_when_list_is_null();
	tearDown();
	testEnded();
	testStarted("test_should_ArrayList_get_index_of_search_element");
	setup();
		test_should_ArrayList_get_index_of_search_element();
	tearDown();
	testEnded();
	testStarted("test_should_ArrayList_get_minus_1_if_element_not_found");
	setup();
		test_should_ArrayList_get_minus_1_if_element_not_found();
	tearDown();
	testEnded();
	testStarted("test_iterator_hasNext_should_give_TRUE_when_element_is_present");
	setup();
		test_iterator_hasNext_should_give_TRUE_when_element_is_present();
	tearDown();
	testEnded();
	testStarted("test_iterator_hasNext_should_give_FALSE_when_element_is_not_present");
	setup();
		test_iterator_hasNext_should_give_FALSE_when_element_is_not_present();
	tearDown();
	testEnded();
	testStarted("test_iterator_next_should_give_next_element");
	setup();
		test_iterator_next_should_give_next_element();
	tearDown();
	testEnded();
	testStarted("test_iterator_next_should_give_NULL_in_empty_ArrayList");
	setup();
		test_iterator_next_should_give_NULL_in_empty_ArrayList();
	tearDown();
	testEnded();
	testStarted("test_deletes_single_element_from_list");
	setup();
		test_deletes_single_element_from_list();
	tearDown();
	testEnded();
	testStarted("test_deletes_and_shifts_elements_left");
	setup();
		test_deletes_and_shifts_elements_left();
	tearDown();
	testEnded();
	testStarted("test_add_adds_to_end_of_list");
	setup();
		test_add_adds_to_end_of_list();
	tearDown();
	testEnded();
	testStarted("test_add_adds_multiple_data_to_end_of_list");
	setup();
		test_add_adds_multiple_data_to_end_of_list();
	tearDown();
	testEnded();
	testStarted("test_iterate_visits_each_element_of_list");
	setup();
		test_iterate_visits_each_element_of_list();
	tearDown();
	testEnded();

	summarizeTestCount();
	fixtureTearDown();
	return 0;
}
Esempio n. 3
0
int main(){
	fixtureSetup();
	resetTestCount();

	testStarted("test_insert_element");
	setup();
		test_insert_element();
	tearDown();
	testEnded();
	testStarted("test_insert_multiple_elements");
	setup();
		test_insert_multiple_elements();
	tearDown();
	testEnded();
	testStarted("test_interns_grows_beyond_capacity");
	setup();
		test_interns_grows_beyond_capacity();
	tearDown();
	testEnded();
	testStarted("test_should_not_insert_at_index_beyond_length");
	setup();
		test_should_not_insert_at_index_beyond_length();
	tearDown();
	testEnded();
	testStarted("test_should_not_insert_at_negative_index");
	setup();
		test_should_not_insert_at_negative_index();
	tearDown();
	testEnded();
	testStarted("test_insert_at_middle_should_shift_the_elements");
	setup();
		test_insert_at_middle_should_shift_the_elements();
	tearDown();
	testEnded();
	testStarted("test_should_not_insert_when_list_is_null");
	setup();
		test_should_not_insert_when_list_is_null();
	tearDown();
	testEnded();
	testStarted("test_remove_last_element_from_arraylist");
	setup();
		test_remove_last_element_from_arraylist();
	tearDown();
	testEnded();
	testStarted("test_remove_middle_element_from_arraylist");
	setup();
		test_remove_middle_element_from_arraylist();
	tearDown();
	testEnded();
	testStarted("test_should_not_remove_element_on_index_out_of_bound");
	setup();
		test_should_not_remove_element_on_index_out_of_bound();
	tearDown();
	testEnded();
	testStarted("test_add_element_at_last_only_using_add_functionality");
	setup();
		test_add_element_at_last_only_using_add_functionality();
	tearDown();
	testEnded();
	testStarted("test_serach_element_in_array_list");
	setup();
		test_serach_element_in_array_list();
	tearDown();
	testEnded();
	testStarted("test_serach_element_which_is_absent_in_array_list");
	setup();
		test_serach_element_which_is_absent_in_array_list();
	tearDown();
	testEnded();
	testStarted("test_array_iterator_with_two_elements_has_next");
	setup();
		test_array_iterator_with_two_elements_has_next();
	tearDown();
	testEnded();
	testStarted("test_array_iterator_with_zero_elements_dont_have_next");
	setup();
		test_array_iterator_with_zero_elements_dont_have_next();
	tearDown();
	testEnded();
	testStarted("test_accessing_next_element_using_array_iterator");
	setup();
		test_accessing_next_element_using_array_iterator();
	tearDown();
	testEnded();
	testStarted("test_accessing_next_element_of_iterator_of_NULL_array_List_gives_NULL");
	setup();
		test_accessing_next_element_of_iterator_of_NULL_array_List_gives_NULL();
	tearDown();
	testEnded();

	summarizeTestCount();
	fixtureTearDown();
	return 0;
}