Search in sources :

Example 11 with Bundle

use of android.os.Bundle in project cucumber-jvm by cucumber.

the class ArgumentsTest method supports_monochrome_as_direct_bundle_argument.

@Test
public void supports_monochrome_as_direct_bundle_argument() {
    // given
    final Bundle bundle = new Bundle();
    bundle.putString("monochrome", "true");
    final Arguments arguments = new Arguments(bundle);
    // when
    final String cucumberOptions = arguments.getCucumberOptions();
    // then
    assertThat(cucumberOptions, is("--monochrome"));
}
Also used : Bundle(android.os.Bundle) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) Test(org.junit.Test)

Example 12 with Bundle

use of android.os.Bundle in project cucumber-jvm by cucumber.

the class ArgumentsTest method isCoverageEnabled_returns_false_when_bundle_contains_false.

@Test
public void isCoverageEnabled_returns_false_when_bundle_contains_false() {
    // given
    final Bundle bundle = spy(new Bundle());
    bundle.putString(Arguments.KEY.COVERAGE_ENABLED, "false");
    // when
    final Arguments arguments = new Arguments(bundle);
    // then
    assertThat(arguments.isCoverageEnabled(), is(false));
}
Also used : Bundle(android.os.Bundle) Test(org.junit.Test)

Example 13 with Bundle

use of android.os.Bundle in project cucumber-jvm by cucumber.

the class ArgumentsTest method isCoverageEnabled_returns_false_when_bundle_contains_no_value.

@Test
public void isCoverageEnabled_returns_false_when_bundle_contains_no_value() {
    // given
    final Bundle bundle = spy(new Bundle());
    // when
    final Arguments arguments = new Arguments(bundle);
    // then
    assertThat(arguments.isCoverageEnabled(), is(false));
}
Also used : Bundle(android.os.Bundle) Test(org.junit.Test)

Example 14 with Bundle

use of android.os.Bundle in project cucumber-jvm by cucumber.

the class ArgumentsTest method supports_dryRun_as_direct_bundle_argument.

@Test
public void supports_dryRun_as_direct_bundle_argument() {
    // given
    final Bundle bundle = new Bundle();
    bundle.putString("dryRun", "true");
    final Arguments arguments = new Arguments(bundle);
    // when
    final String cucumberOptions = arguments.getCucumberOptions();
    // then
    assertThat(cucumberOptions, is("--dry-run"));
}
Also used : Bundle(android.os.Bundle) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) Test(org.junit.Test)

Example 15 with Bundle

use of android.os.Bundle in project cucumber-jvm by cucumber.

the class ArgumentsTest method supports_snippets_as_direct_bundle_argument.

@Test
public void supports_snippets_as_direct_bundle_argument() {
    // given
    final Bundle bundle = new Bundle();
    bundle.putString("snippets", "someSnippet");
    final Arguments arguments = new Arguments(bundle);
    // when
    final String cucumberOptions = arguments.getCucumberOptions();
    // then
    assertThat(cucumberOptions, is("--snippets someSnippet"));
}
Also used : Bundle(android.os.Bundle) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) Test(org.junit.Test)

Aggregations

Bundle (android.os.Bundle)6155 Intent (android.content.Intent)826 RemoteException (android.os.RemoteException)477 View (android.view.View)342 Test (org.junit.Test)266 ArrayList (java.util.ArrayList)216 TextView (android.widget.TextView)203 PersistableBundle (android.os.PersistableBundle)201 PendingIntent (android.app.PendingIntent)185 IOException (java.io.IOException)176 Uri (android.net.Uri)155 ImageView (android.widget.ImageView)152 ComponentName (android.content.ComponentName)124 Fragment (android.support.v4.app.Fragment)124 Message (android.os.Message)122 JSONObject (org.json.JSONObject)112 Account (android.accounts.Account)108 Context (android.content.Context)102 Parcelable (android.os.Parcelable)99 Bitmap (android.graphics.Bitmap)90