var singleCommand = {
name: "theMethodName",
arguments: ["array", 1, true, false, "of values to the method"],
variable: "@@variable_name_to_store_this_result@@", // (optional)
target: "Robotium" // (optional) other option is LastResultOrRobotium (the default)
};
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe("testing a Backbone fetch", function () { | |
| beforeEach(function () { | |
| spyOn($, 'ajax'); | |
| }); | |
| it("should have been called with this", function () { | |
| var sut = new MyModel({}); | |
| sut.fetch(); | |
| var ajaxOptions = { type: 'GET', dataType: 'json', success: undefined, error: jasmine.any(Function), url: '/MyModel' }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class AbsFragmentActivity extends FragmentActivity { | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| ActionBar actionBar = getSupportActionBar(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| class Foo { | |
| public: | |
| Foo(int blar) { | |
| _member = blar; | |
| } | |
| operator int() const { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.leviwilson.test; | |
| import static org.hamcrest.CoreMatchers.is; | |
| import static org.hamcrest.CoreMatchers.not; | |
| import static org.junit.Assert.assertThat; | |
| import java.util.Date; | |
| import org.junit.Test; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # update packages | |
| sudo apt-get update | |
| # Install git | |
| sudo apt-get install git-core | |
| # Install jdk | |
| sudo apt-get install openjdk-6-jdk | |
| # Setup Maven |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Packages available for installation or update: 66 | |
| 1- Android SDK Tools, revision 19 | |
| 2- Android SDK Platform-tools, revision 11 | |
| 3- Documentation for Android SDK, API 15, revision 2 | |
| 4- SDK Platform Android 4.0.3, API 15, revision 3 | |
| 5- SDK Platform Android 4.0, API 14, revision 3 | |
| 6- SDK Platform Android 3.2, API 13, revision 1 | |
| 7- SDK Platform Android 3.1, API 12, revision 3 | |
| 8- SDK Platform Android 3.0, API 11, revision 2 | |
| 9- SDK Platform Android 2.3.3, API 10, revision 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| language: java | |
| before_install: | |
| # download the latest android sdk and unzip | |
| - wget http://dl.google.com/android/android-sdk_r18-linux.tgz | |
| - tar -zxf android-sdk_r18-linux.tgz | |
| # setup your ANDROID_HOME and PATH environment variables | |
| - export ANDROID_HOME=~/builds/[github username]/[your project name]/android-sdk-linux | |
| - export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools | |
| # only update the sdk for the tools and platform-tools (1,2) and whatever api level | |
| # you are building for android (run "android list sdk" to get the full list. 9 = 2.3.3 or API level 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SomeActivityTest { | |
| SomeActivity activity; | |
| @Before | |
| public void setUp() { | |
| activity = new SomeActivity(); | |
| ConnectivityManager connectivityManager = getConnectivityManager(); | |
| Robolectric.shadowOf(connectivityManager).setNetworkInfo(TYPE_MOBILE, new NetworkInfo()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class LoginPage | |
| include Gametel | |
| text(:username, :index => 0) | |
| text(:password, :index => 1) | |
| def login_successfully | |
| self.username = 'user' | |
| self.password = 'secret' | |
| on(LandingPage).should be_active |