<commit_before>package ca.ualberta.cs.cmput301t02project.test;

import ca.ualberta.cs.cmput301t02project.activity.BrowseFavoritesActivity;
import android.test.ActivityInstrumentationTestCase2;

public class BrowseFavoritesActivityTest extends ActivityInstrumentationTestCase2<BrowseFavoritesActivity> {

	public BrowseFavoritesActivityTest() {
		super(BrowseFavoritesActivity.class);
	}

	public void testDisplayFavorites() {
		assertTrue(false);
	}

	/* Test for use case 21 */
	public void testDisplayUsername() {
		assertTrue(false);
<commit_msg>added some code for BrowseFavoritesActivityTest, although throws error<commit_after>package ca.ualberta.cs.cmput301t02project.test;

import ca.ualberta.cs.cmput301t02project.ProjectApplication;
import ca.ualberta.cs.cmput301t02project.R;
import ca.ualberta.cs.cmput301t02project.activity.BrowseFavoritesActivity;
import ca.ualberta.cs.cmput301t02project.model.CommentModel;
import android.location.Location;
import android.test.ActivityInstrumentationTestCase2;
import android.widget.ListView;

public class BrowseFavoritesActivityTest extends ActivityInstrumentationTestCase2<BrowseFavoritesActivity> {

	public BrowseFavoritesActivityTest() {
		super(BrowseFavoritesActivity.class);
	}
	
	public CommentModel initializeComment() {
		String loc = "Location Intialization";
		Location currentLocation;
		Location myLocation;
		currentLocation = new Location(loc);
		myLocation = new Location(loc);

		CommentModel comment = new CommentModel("comment", currentLocation, "username");

		ProjectApplication.setCurrentLocation(myLocation);

		return comment;
	}

	public void testDisplayFavorites() {
		assertTrue(false);
	}

	/* Test for use case 21 */
	public void testDisplayUsername() {
		//Currently throws an error -KW
		CommentModel comment = initializeComment();

		ListView view = (ListView) getActivity().findViewById(R.id.commentListView);
		assertTrue("username should be displayed", view.getAdapter().getItem(0).toString().contains(comment.getUsername()));

		

{'fraction_non_alphanumeric': 0.09014363546310054, 'fraction_numerical': 0.021792966815255076, 'mean_word_length': 6.680608365019012, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7665346', 'n_tokens_mistral': 644, 'n_tokens_neox': 585, 'n_words': 113}