Tabnine Logo
Either.left
Code IndexAdd Tabnine to your IDE (free)

How to use
left
method
in
com.novoda.noplayer.model.Either

Best Java code snippets using com.novoda.noplayer.model.Either.left (Showing top 4 results out of 315)

origin: novoda/no-player

@Override
public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int width, int height) {
  this.eitherSurface = Either.left(new Surface(surfaceTexture));
  notifyListeners(eitherSurface);
  callbacks.clear();
}
origin: novoda/no-player

@Test
public void givenEitherContainsLeft_whenApplyingConsumers_thenRunsLeftConsumerWithCorrectValue() {
  String value = "foo";
  Either<String, Integer> either = Either.left(value);
  either.apply(leftConsumer, rightConsumer);
  verify(leftConsumer).accept(value);
}
origin: novoda/no-player

@Test
public void givenSurfaceRequesterReturnsSurface_whenPreparing_thenSetsSurface() {
  Surface surface = mock(Surface.class);
  Either<Surface, SurfaceHolder> eitherSurface = Either.left(surface);
  givenSurfaceRequesterReturns(eitherSurface);
  givenMediaPlayerIsPreparedWith(eitherSurface);
  verify(mediaPlayer).setSurface(surface);
}
origin: novoda/no-player

@Before
public void setUp() {
  NoPlayerLog.setLoggingEnabled(false);
  facade = new AndroidMediaPlayerFacade(context, forwarder, audioManager, trackSelector, playbackStateChecker, mediaPlayerCreator);
  given(mediaPlayerCreator.createMediaPlayer()).willReturn(mediaPlayer);
  given(playbackStateChecker.isInPlaybackState(eq(mediaPlayer), any(PlaybackStateChecker.PlaybackState.class))).willReturn(IS_IN_PLAYBACK_STATE);
  eitherSurface = Either.left(surface);
  givenSurfaceRequesterReturns(eitherSurface);
  given(forwarder.onPreparedListener()).willReturn(preparedListener);
  given(forwarder.onCompletionListener()).willReturn(completionListener);
  given(forwarder.onErrorListener()).willReturn(errorListener);
  given(forwarder.onSizeChangedListener()).willReturn(videoSizeChangedListener);
}
com.novoda.noplayer.modelEitherleft

Popular methods of Either

  • apply
  • right

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • setContentView (Activity)
  • onCreateOptionsMenu (Activity)
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JList (javax.swing)
  • JOptionPane (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now