<commit_before>package dev.blunch.blunch.activity;

import android.os.Build;
import android.support.v7.widget.Toolbar;
import android.widget.Button;
import android.widget.TextView;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.Robolectric;
import org.robolectric.RobolectricGradleTestRunner;
import org.robolectric.annotation.Config;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import dev.blunch.blunch.BuildConfig;
import dev.blunch.blunch.R;
import dev.blunch.blunch.domain.CollaborativeMenu;
import dev.blunch.blunch.domain.Dish;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

/**
 * Get Menu Collaborative Activity Test
 * @author albert
 */
@Config(constants = BuildConfig.class, sdk = Build.VERSION_CODES.LOLLIPOP)
@RunWith(RobolectricGradleTestRunner.class)
public class GetMenuCollaborativeActivityTest {

    GetMenuCollaborativeActivity activity;

    private TextView    userName,
                        localization,
                        city,
                        hostDishes,
                        suggestions,
                        description,
                        hour;
    private Button join;
    private Toolbar toolbar;

    @Before
    public void setup() {
        activity = Robolectric.setupActivity(GetMenuCollaborativeActivity.class);

        userName = (TextView) activity.findViewById(R.id.hostName);
        localization = (TextView) activity.findViewById(R.id.hostLocalization);
        city = (TextView) activity.findViewById(R.id.hostCity);
        hostDishes = (TextView) activity.findViewById(R.id.hostDishes);
        suggestions = (TextView) activity.findViewById(R.id.suggestions);
        description = (TextView) activity.findViewById(R.id.description);
        hour = (TextView) activity.findViewById(R.id.hour);
        join = (Button) activity.findViewById(R.id.join);
        toolbar = (Toolbar) activity.findViewById(R.id.toolbar);
    }

    @Test
    public void shouldNotBeNull() throws Exception {
        assertNotNull(userName);
        assertNotNull(localization);
        assertNotNull(city);
        assertNotNull(hostDishes);
        assertNotNull(suggestions);
        assertNotNull(description);
        assertNotNull(hour);
        assertNotNull(join);
        assertNotNull(toolbar);
    }

    @Test
    public void textViewCorrect() throws Exception {
        final String ID = "1234";
        final String AUTHOR = "<NAME>";
        final String NAME = "El plato del bicho";
        final String DESCRIPTION = "Ponte como el bicho con este menu";
        final String LOCALIZATION = "Santiago Bernabeu, Madrid";
        final Date DATE_START = createHourOfToday(20, 45);
        final Date DATE_END = createHourOfToday(22, 30);
        final String SUGGEST_DISH_KEY_1 = "0001";
        final String SUGGEST_DISH_KEY_2 = "0002";
        final String OFFERED_DISH_KEY_1 = "0003";
        final String SUGGEST_DISH_NAME_1 = "<NAME>";
        final String SUGGEST_DISH_NAME_2 = "<NAME>";
        final String OFFERED_DISH_NAME_1 = "CR7 en persona";<commit_msg>finish history v3<commit_after>package dev.blunch.blunch.activity;

import android.os.Build;
import android.support.v7.widget.Toolbar;
import android.widget.Button;
import android.widget.TextView;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.Robolectric;
import org.robolectric.RobolectricGradleTestRunner;
import org.robolectric.annotation.Config;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import dev.blunch.blunch.BuildConfig;
import dev.blunch.blunch.R;
import dev.blunch.blunch.domain.CollaborativeMenu;
import dev.blunch.blunch.domain.Dish;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

/**
 * Get Menu Collaborative Activity Test
 * @author albert
 */
@Config(constants = BuildConfig.class, sdk = Build.VERSION_CODES.LOLLIPOP)
@RunWith(RobolectricGradleTestRunner.class)
public class GetMenuCollaborativeActivityTest {

    GetMenuCollaborativeActivity activity;

    private TextView    userName,
                        localization,
                        city,
                        hostDishes,
                        suggestions,
                        description,
                        hour;
    private Button join;
    private Toolbar toolbar;

    @Before
    public void setup() {
        activity = Robolectric.setupActivity(GetMenuCollaborativeActivity.class);

        userName = (TextView) activity.findViewById(R.id.hostName);
        localization = (TextView) activity.findViewById(R.id.hostLocalization);
        city = (TextView) activity.findViewById(R.id.hostCity);
        hostDishes = (TextView) activity.findViewById(R.id.hostDishes);
        suggestions = (TextView) activity.findViewById(R.id.suggestions);
        description = (TextView) activity.findViewById(R.id.description);
        hour = (TextView) activity.findViewById(R.id.hour);
        join = (Button) activity.findViewById(R.id.join);
        toolbar = (Toolbar) activity.findViewById(R.id.toolbar);
    }

    @Test
    public void textViewCorrect() throws Exception {
        final String ID = "1234";
        final String AUTHOR = "<NAME>";
        final String NAME = "El plato del bicho";
        final String DESCRIPTION = "Ponte como el bicho con este menu";
        final String LOCALIZATION = "Santiago Bernabeu, Madrid";
        final Date DATE_START = createHourOfToday(20, 45);
        final Date DATE_END = createHourOfToday(22, 30);
        final String SUGGEST_DISH_KEY_1 = "0001";
        final String SUGGEST_DISH_KEY_2 = "0002";
        final String OFFERED_DISH_KEY_1 = "0003";
        final String SUGGEST_DISH_NAME_1 = "<NAME>";
        final String SUGGEST_DISH_NAME_2 = "<NAME>";
        final String OFFERED_DISH_NAME_1 = "CR7 en persona";
{'fraction_non_alphanumeric': 0.09430255402750491, 'fraction_numerical': 0.010641781270464964, 'mean_word_length': 3.130493576741041, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6443572', 'n_tokens_mistral': 1833, 'n_tokens_neox': 1718, 'n_words': 386}