@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; } }; }
@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()); }
@BeforeEach void init() { replayingChannel = new ReplayingTaskChannelDecorator<>( decoratedChannel, emptySet(), emptySet(), emptySet()); }
@BeforeEach void createReplayingChannel() { replayingChannel = new ReplayingTaskChannelDecorator<>( decoratedChannel, tasksToReplay, resultsToReplay, errorsToReplay); }
@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 -> { }); }
@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); }
@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); }
@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()); }
@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); }
@BeforeEach void beforeEachTest(final TestInfo testInfo) { LOGGER.info("running test '{}'", testInfo.getDisplayName()); startTime = System.currentTimeMillis(); }
@BeforeEach void setup() { configuration = new JUnit5Configuration(); testUnitFinder = configuration.testUnitFinder(); }
@BeforeEach public void setUpTestMethod() { print("Executed before each test in this class."); }
@BeforeEach void mockDecoratedChannel() { decoratedChannel = mock(TaskChannel.class); }
@BeforeEach void mockDecoratedAndListeningChannel() { decoratedChannel = mock(TaskChannel.class); listeningChannel = mock(TaskChannel.class); }
@BeforeEach void createSpyingChannel() { spyingChannel = new SpyingTaskChannelDecorator<>(decoratedChannel, listeningChannel); }
@BeforeEach void createPersister() { persister = new YamlPersister(); }
@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)); }
@BeforeEach void beforeEach() { p = new Playlist(); }
@BeforeEach void beforeEach() { p.setElements(Arrays.asList(new PlaylistElement(0), new PlaylistElement(1), new PlaylistElement(2))); }
@BeforeEach void beforeEach() { p.addSongsLast(Arrays.asList(new SongInfo(0), new SongInfo(1), new SongInfo(2))); }
@BeforeEach void beforeEach() { p.addSongsLast(Arrays.asList(new SongInfo(10), new SongInfo(11), new SongInfo(12))); }
@BeforeEach void beforeEach() { p.addElementLast(new PlaylistElement(10)); p.addElementLast(new PlaylistElement(11)); p.addElementLast(new PlaylistElement(12)); }
@BeforeEach void beforeEach() { p.setID(7); p.addSongLast(new SongInfo(10)); }
@BeforeEach void beforeEach() { elem = new PlaylistElement(); }
@BeforeEach void beforeEach() { elem.setID(7); elem.setSong(new SongInfo(10)); }
@BeforeEach void beforeEach() { controller = new PlaylistController(); }
@BeforeEach void beforeEach() throws IOException { playlistsToCleanup = new ArrayList<Playlist>(); LibraryRESTCalls.rebuildLibrary(); }
@BeforeEach void beforeEach() throws IOException { p = cleanup(PlaylistRESTCalls.createPlaylist()); }
@BeforeEach void beforeEach() throws IOException { pID = cleanup(PlaylistRESTCalls.createPlaylist()).getID(); }
@BeforeEach public void setUp() throws IOException { queuesToCleanup = new ArrayList<Queue>(); LibraryRESTCalls.rebuildLibrary(); }
@BeforeEach public void beforeEach() throws IOException { LibraryRESTCalls.rebuildLibrary(); }
@BeforeEach public void nonTestMethod() { }