<commit_before>package com.xamoom.android;

import android.app.Application;
import android.test.ApplicationTestCase;

import com.xamoom.android.mapping.ContentById;
import com.xamoom.android.mapping.ContentByLocationIdentifier;
import com.xamoom.android.mapping.ContentList;
import com.xamoom.android.mapping.SpotMap;

import java.util.concurrent.CountDownLatch;

import retrofit.RetrofitError;

/**
 * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
 */
public class ApplicationTest extends ApplicationTestCase<Application> {
    public ApplicationTest() {
        super(Application.class);
    }

    private String API_KEY;
    private static String TESTING_CONTENT_ID = "a814886d3ef9409682b71b46802031c4";
    private static String TESTING_MARKER_ID = "0ana0";
    private static String[] TESTING_BEACON = new String[]{"de2b94ae-ed98-11e4-3432-78616d6f6f6d","5704","1209"};

    @Override
    public void setUp() throws Exception {
        super.setUp();
        API_KEY = this.getSystemContext().getString(R.string.apiKey);
    }

    public void testGetInstance() throws Exception {
        assertNotNull("getInstance() should return an object", XamoomEndUserApi.getInstance(getContext(), API_KEY));
    }

    public void testGetContentbyIdFull() throws Exception {
        final CountDownLatch signal = new CountDownLatch(1);

        XamoomEndUserApi.getInstance(getContext(), API_KEY).getContentbyIdFull(TESTING_CONTENT_ID, false, false, "de", true, new APICallback<ContentById>() {
            @Override
            public void finished(ContentById result) {
                assertNotNull("getContentbyIdFull() should return an object", result);

                //variable test
                assertNotNull("getContentbyIdFull() should return a systemName", result.getSystemName());
                assertNotNull("getContentbyIdFull() should return a systemUrl", result.getSystemUrl());
                assertNotNull("getContentbyIdFull() should return a systemId", result.getSystemId());
                assertNull("getContentbyIdFull() should not return a style", result.getStyle());
                assertNull("getContentbyIdFull() should not return a menu", result.getMenu());

                signal.countDown();
            }

            @Override
            public void error(RetrofitError error) {<commit_msg>Update ApplicationTest<commit_after>package com.xamoom.android;

import android.app.Application;
import android.test.ApplicationTestCase;

import com.xamoom.android.mapping.ContentById;
import com.xamoom.android.mapping.ContentByLocationIdentifier;
import com.xamoom.android.mapping.ContentList;
import com.xamoom.android.mapping.SpotMap;

import java.util.concurrent.CountDownLatch;

import retrofit.RetrofitError;

/**
 * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
 */
public class ApplicationTest extends ApplicationTestCase<Application> {
    public ApplicationTest() {
        super(Application.class);
    }

    private boolean isDev = true;
    private String API_KEY;
    private static String TESTING_CONTENT_ID;
    private static String TESTING_MARKER_ID;
    private static String[] TESTING_BEACON;

    @Override
    public void setUp() throws Exception {
        super.setUp();

        if (isDev) {
            API_KEY = this.getSystemContext().getString(R.string.dev_apiKey);
            TESTING_CONTENT_ID = this.getSystemContext().getString(R.string.dev_content_id);
            TESTING_MARKER_ID = this.getSystemContext().getString(R.string.dev_marker_id);
            TESTING_BEACON = new String[]{
                    this.getSystemContext().getString(R.string.dev_ibeacon_id_1),
                    this.getSystemContext().getString(R.string.dev_ibeacon_id_2),
                    this.getSystemContext().getString(R.string.dev_ibeacon_id_3)};
        } else {
            API_KEY = this.getSystemContext().getString(R.string.prod_apiKey);
            TESTING_CONTENT_ID = this.getSystemContext().getString(R.string.prod_content_id);
            TESTING_MARKER_ID = this.getSystemContext().getString(R.string.prod_marker_id);
            TESTING_BEACON = new String[]{
                    this.getSystemContext().getString(R.string.prod_ibeacon_id_1),
                    this.getSystemContext().getString(R.string.prod_ibeacon_id_2),
                    this.getSystemContext().getString(R.string.prod_ibeacon_id_3)};
        }
    }

    public void testGetInstance() throws Exception {
        assertNotNull("getInstance() should return an object", XamoomEndUserApi.getInstance(getContext(), API_KEY));
    }

    public void testGetContentbyIdFull() throws Exception {
        final CountDownLatch signal = new CountDownLatch(1);

        XamoomEndUserApi.getInstance(getContext(), API_KEY).getContentbyIdFull(TESTING_CONTENT_ID, false, false, "de", true, new APICallback<ContentById>() {
            @Override
            public void finished(ContentById result) {
                assertNotNull("getContentbyIdFull() should return an object", result);

                //variable test
                assertNotNull("getContentbyIdFull() should return a systemName", result.getSystemName());
                assertNotNull("getContentbyIdFull() should return a systemUrl", result.getSystemUrl());
                assertNotNull("getContentbyIdFull() should return a systemId", result.getSystemId());
                assertNull("getContentbyIdFull() should not return a style", result.getStyle());
                assertNull("getContentbyIdFull() should not return a menu", result.getMenu());

                signal.countDown();
            }

            @Override
            public void error(RetrofitError error) {
{'fraction_non_alphanumeric': 0.10145681581685743, 'fraction_numerical': 0.010926118626430802, 'mean_word_length': 3.3005219985085756, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '6351602', 'n_tokens_mistral': 1619, 'n_tokens_neox': 1556, 'n_words': 302}