Package org.mockito.internal.runners.util

Source Code of org.mockito.internal.runners.util.RunnerProviderTest

/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.runners.util;

import org.junit.Test;
import org.mockito.internal.runners.RunnerImpl;
import org.mockitoutil.TestBase;


public class RunnerProviderTest extends TestBase {
   
    @Test
    public void shouldKnowAboutJUnit45() throws Exception {
        //given
        RunnerProvider provider = new RunnerProvider();
        //then
        assertTrue(provider.isJUnit45OrHigherAvailable());
        //I cannot test the opposite condition :(
    }
   
    @Test
    public void shouldCreateRunnerInstance() throws Throwable {
        //given
        RunnerProvider provider = new RunnerProvider();
        //when
        RunnerImpl runner = provider.newInstance("org.mockito.internal.runners.JUnit45AndHigherRunnerImpl", this.getClass());
        //then
        assertNotNull(runner);
    }
}
TOP

Related Classes of org.mockito.internal.runners.util.RunnerProviderTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.