Java 类org.junit.gen5.api.BeforeEach 实例源码

项目:spring-javafx    文件:FXMLControllerLoaderTest.java   
@BeforeEach
void createLoader() {
    outerLoader = new FXMLControllerLoader() {
        {
            setResourceBundle(resourceBundle);
            setBuilderFactory(builderFactory);
            setControllerFactory(controllerFactory);
        }

        @Override
        protected FXMLLoader createFXMLLoader() {
            innerLoader = spy(super.createFXMLLoader());
            try {
                doAnswer(invocation -> innerLoaderResult).when(innerLoader).load();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return innerLoader;
        }

    };
}
项目:pitest-junit-5-plugin    文件:JUnit5TestPluginFactoryTest.java   
@BeforeEach
public void setUp() {
    MockitoAnnotations.initMocks(this);
    this.realSource = new ClassloaderByteArraySource(
            IsolationUtils.getContextClassLoader());

    this.factory = new JUnit5TestPluginFactory();

    when(this.source.getBytes("org.junit.Test")).thenReturn(
            Option.none());
    when(this.source.getBytes("org.junit.gen5.api.Test")).thenReturn(
            Option.none());
}
项目:jdeps-wall-of-shame    文件:ReplayingTaskChannelDecoratorTest.java   
@BeforeEach
void init() {
    replayingChannel = new ReplayingTaskChannelDecorator<>(
            decoratedChannel,
            emptySet(),
            emptySet(),
            emptySet());
}
项目:jdeps-wall-of-shame    文件:ReplayingTaskChannelDecoratorTest.java   
@BeforeEach
void createReplayingChannel() {
    replayingChannel = new ReplayingTaskChannelDecorator<>(
            decoratedChannel,
            tasksToReplay,
            resultsToReplay,
            errorsToReplay);
}
项目:jdeps-wall-of-shame    文件:ReplayingTaskChannelDecoratorTest.java   
@BeforeEach
void createReplayingChannelThenDrain() {
    replayingChannel = new ReplayingTaskChannelDecorator<>(
            decoratedChannel,
            tasksToReplay,
            resultsToReplay,
            errorsToReplay);
    when(decoratedChannel.drainTasks()).thenReturn(Stream.of());
    when(decoratedChannel.drainResults()).thenReturn(Stream.of());
    when(decoratedChannel.drainErrors()).thenReturn(Stream.of());
    replayingChannel.drainTasks().forEach(ignore -> { });
    replayingChannel.drainResults().forEach(ignore -> { });
    replayingChannel.drainErrors().forEach(ignore -> { });
}
项目:evilmusic    文件:LibraryUtilsTest.java   
@BeforeEach
void beforeEach() {
    ids = Arrays.asList(0, 1, 2);

    s0 = new SongInfo(0);
    s1 = new SongInfo(1);
    s2 = new SongInfo(2);
    songs = Arrays.asList(s2, s1, s0);
}
项目:evilmusic    文件:PlaylistRESTTest.java   
@BeforeEach
void beforeEach() throws IOException {
    final Library lib = LibraryRESTCalls.getLibrary();

    p = cleanup(PlaylistRESTCalls.createPlaylist());
    s0 = lib.getSongs().get(0);
    s1 = lib.getSongs().get(1);
    s2 = lib.getSongs().get(2);
    s3 = lib.getSongs().get(3);
    s4 = lib.getSongs().get(4);
}
项目:evilmusic    文件:PlaylistRESTTest.java   
@BeforeEach
void beforeEach() throws IOException {
    final Library lib = LibraryRESTCalls.getLibrary();

    p = cleanup(PlaylistRESTCalls.createPlaylist());
    p = PlaylistRESTCalls.addLast(200, p.getID(), //
            lib.getSongs().get(0).getID(), //
            lib.getSongs().get(1).getID(), //
            lib.getSongs().get(2).getID());
}
项目:evilmusic    文件:PlaylistRESTTest.java   
@BeforeEach
void beforeEach() throws IOException {
    final Library lib = LibraryRESTCalls.getLibrary();

    p = cleanup(PlaylistRESTCalls.createPlaylist());
    p = PlaylistRESTCalls.addLast(200, p.getID(), //
            lib.getSongs().get(0).getID(), //
            lib.getSongs().get(1).getID(), //
            lib.getSongs().get(2).getID());

    e0 = p.getElement(0);
    e1 = p.getElement(1);
    e2 = p.getElement(2);
}
项目:pitest-junit-5-plugin    文件:JUnit5IntegrationTest.java   
@BeforeEach
void beforeEachTest(final TestInfo testInfo) {
    LOGGER.info("running test '{}'", testInfo.getDisplayName());
    startTime = System.currentTimeMillis();
}
项目:pitest-junit-5-plugin    文件:JUnit5ConfigurationTest.java   
@BeforeEach
void setup() {
    configuration = new JUnit5Configuration();
    testUnitFinder = configuration.testUnitFinder();
}
项目:lab-junitlambda    文件:_0_BasicFeatures.java   
@BeforeEach
public void setUpTestMethod() {
    print("Executed before each test in this class.");
}
项目:jdeps-wall-of-shame    文件:ReplayingTaskChannelDecoratorTest.java   
@BeforeEach
void mockDecoratedChannel() {
    decoratedChannel = mock(TaskChannel.class);
}
项目:jdeps-wall-of-shame    文件:SpyingTaskChannelDecoratorTest.java   
@BeforeEach
void mockDecoratedAndListeningChannel() {
    decoratedChannel = mock(TaskChannel.class);
    listeningChannel = mock(TaskChannel.class);
}
项目:jdeps-wall-of-shame    文件:SpyingTaskChannelDecoratorTest.java   
@BeforeEach
void createSpyingChannel() {
    spyingChannel = new SpyingTaskChannelDecorator<>(decoratedChannel, listeningChannel);
}
项目:jdeps-wall-of-shame    文件:SpyingTaskChannelDecoratorTest.java   
@BeforeEach
void createSpyingChannel() {
    spyingChannel = new SpyingTaskChannelDecorator<>(decoratedChannel, listeningChannel);
}
项目:jdeps-wall-of-shame    文件:YamlPersisterTest.java   
@BeforeEach
void createPersister() {
    persister = new YamlPersister();
}
项目:spring-javafx    文件:FXMLControllerPostProcessorTest.java   
@BeforeEach
public void initialize() throws IOException {
    when(resourceLoader.getResource(anyString())).thenReturn(resource);
    when(resource.getURL()).thenReturn(getClass().getResource(DEFAULT_RESOURCE_PREFIX + "empty" + DEFAULT_RESOURCE_SUFFIX));
}
项目:evilmusic    文件:PlaylistTest.java   
@BeforeEach
void beforeEach() {
    p = new Playlist();
}
项目:evilmusic    文件:PlaylistTest.java   
@BeforeEach
void beforeEach() {
    p.setElements(Arrays.asList(new PlaylistElement(0), new PlaylistElement(1), new PlaylistElement(2)));
}
项目:evilmusic    文件:PlaylistTest.java   
@BeforeEach
void beforeEach() {
    p.addSongsLast(Arrays.asList(new SongInfo(0), new SongInfo(1), new SongInfo(2)));
}
项目:evilmusic    文件:PlaylistTest.java   
@BeforeEach
void beforeEach() {
    p.addSongsLast(Arrays.asList(new SongInfo(10), new SongInfo(11), new SongInfo(12)));
}
项目:evilmusic    文件:PlaylistTest.java   
@BeforeEach
void beforeEach() {
    p.addElementLast(new PlaylistElement(10));
    p.addElementLast(new PlaylistElement(11));
    p.addElementLast(new PlaylistElement(12));
}
项目:evilmusic    文件:PlaylistTest.java   
@BeforeEach
void beforeEach() {
    p.setID(7);
    p.addSongLast(new SongInfo(10));
}
项目:evilmusic    文件:PlaylistElementTest.java   
@BeforeEach
void beforeEach() {
    elem = new PlaylistElement();
}
项目:evilmusic    文件:PlaylistElementTest.java   
@BeforeEach
void beforeEach() {
    elem.setID(7);
    elem.setSong(new SongInfo(10));
}
项目:evilmusic    文件:PlaylistControllerTest.java   
@BeforeEach
void beforeEach() {
    controller = new PlaylistController();
}
项目:evilmusic    文件:PlaylistRESTTest.java   
@BeforeEach
void beforeEach() throws IOException {
    playlistsToCleanup = new ArrayList<Playlist>();
    LibraryRESTCalls.rebuildLibrary();
}
项目:evilmusic    文件:PlaylistRESTTest.java   
@BeforeEach
void beforeEach() throws IOException {
    p = cleanup(PlaylistRESTCalls.createPlaylist());
}
项目:evilmusic    文件:PlaylistRESTTest.java   
@BeforeEach
void beforeEach() throws IOException {
    pID = cleanup(PlaylistRESTCalls.createPlaylist()).getID();
}
项目:evilmusic    文件:PlaylistRESTTest.java   
@BeforeEach
void beforeEach() throws IOException {
    p = cleanup(PlaylistRESTCalls.createPlaylist());
}
项目:evilmusic    文件:QueueRESTTest.java   
@BeforeEach
public void setUp() throws IOException {
    queuesToCleanup = new ArrayList<Queue>();
    LibraryRESTCalls.rebuildLibrary();
}
项目:evilmusic    文件:LibraryRESTTest.java   
@BeforeEach
public void beforeEach() throws IOException {
    LibraryRESTCalls.rebuildLibrary();
}
项目:pitest-junit-5-plugin    文件:JUnit5ConfigurationTest.java   
@BeforeEach
public void nonTestMethod() {

}
项目:pitest-junit-5-plugin    文件:JUnit5ConfigurationTest.java   
@BeforeEach
public void nonTestMethod() {

}