<commit_before>/*
 * Copyright (C) 2016 Arivald
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.pgssoft.gimbus;

import android.test.InstrumentationTestCase;

import java.lang.reflect.Method;

import com.pgssoft.gimbus.mocks.TestEvent1;
import com.pgssoft.gimbus.mocks.TestSubscriber3;

public class DelivererTest extends InstrumentationTestCase {

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

    @Override
    protected void tearDown() throws Exception {
        super.tearDown();
    }

    public void testExecution() throws Exception {
        //prepare
        EventBus bus = new EventBus();
        TestSubscriber3 testSubscriber1 = new TestSubscriber3();
        Method target1SubscriberMethod = TestSubscriber3.class.getMethod("onTestEvent1", TestEvent1.class);

        EventHandler test1EventHandler = new EventHandler(
                testSubscriber1,
                target1SubscriberMethod,
                Dispatcher.getDispatchingMethod(target1SubscriberMethod.getAnnotation(Subscribe.class)));
        TestEvent1 testEvent1 = new TestEvent1();

        //ger deliverer
        Deliverer deliverer1 = new Deliverer(bus, testEvent1, test1EventHandler);
        assertSame(bus, deliverer1.mEventBus);
        assertSame(test1EventHandler, deliverer1.mEventHandler);
        assertSame(testEvent1, deliverer1.mEvent);

        //execute
        deliverer1.run();
        assertSame(testEvent1, testSubscriber1.lastReceivedEvent1);
        testSubscriber1.lastReceivedEvent1 = null;
        assertTrue(1 == 2);
    }


}<commit_msg>Travis - intentional test failure reverted<commit_after>/*
 * Copyright (C) 2016 Arivald
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.pgssoft.gimbus;

import android.test.InstrumentationTestCase;

import java.lang.reflect.Method;

import com.pgssoft.gimbus.mocks.TestEvent1;
import com.pgssoft.gimbus.mocks.TestSubscriber3;

public class DelivererTest extends InstrumentationTestCase {

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

    @Override
    protected void tearDown() throws Exception {
        super.tearDown();
    }

    public void testExecution() throws Exception {
        //prepare
        EventBus bus = new EventBus();
        TestSubscriber3 testSubscriber1 = new TestSubscriber3();
        Method target1SubscriberMethod = TestSubscriber3.class.getMethod("onTestEvent1", TestEvent1.class);

        EventHandler test1EventHandler = new EventHandler(
                testSubscriber1,
                target1SubscriberMethod,
                Dispatcher.getDispatchingMethod(target1SubscriberMethod.getAnnotation(Subscribe.class)));
        TestEvent1 testEvent1 = new TestEvent1();

        //ger deliverer
        Deliverer deliverer1 = new Deliverer(bus, testEvent1, test1EventHandler);
        assertSame(bus, deliverer1.mEventBus);
        assertSame(test1EventHandler, deliverer1.mEventHandler);
        assertSame(testEvent1, deliverer1.mEvent);

        //execute
        deliverer1.run();
        assertSame(testEvent1, testSubscriber1.lastReceivedEvent1);
        testSubscriber1.lastReceivedEvent1 = null;
    }


}
{'fraction_non_alphanumeric': 0.07847800237812129, 'fraction_numerical': 0.01854934601664685, 'mean_word_length': 3.3360824742268043, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3109743', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1130, 'n_words': 328}