Пример #1
0
  public void testFixedAspectRatioSetAsExtras() {
    builder.asSquare();

    Intent intent = builder.getIntent(activity);

    assertThat(intent.getIntExtra("aspect_x", 0)).isEqualTo(1);
    assertThat(intent.getIntExtra("aspect_y", 0)).isEqualTo(1);
  }
Пример #2
0
  public void testBuildsIntentWithMultipleOptions() {
    builder.asSquare().withMaxSize(200, 200);

    Intent intent = builder.getIntent(activity);

    assertThat(intent.getIntExtra("aspect_x", 0)).isEqualTo(1);
    assertThat(intent.getIntExtra("aspect_y", 0)).isEqualTo(1);
    assertThat(intent.getIntExtra("max_x", 0)).isEqualTo(200);
    assertThat(intent.getIntExtra("max_y", 0)).isEqualTo(200);
  }