diff options
author | Ang Li <angli@google.com> | 2018-01-23 09:55:59 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-23 09:55:59 -0800 |
commit | df4a0e82596c10c2c41f86168ff3d0ce3db60efa (patch) | |
tree | 40d406ee175e048bdabdb5a74239d9e4482bdd62 | |
parent | 9116d93c6980124968d952b29b057c61a13c3422 (diff) | |
download | mobly-snippet-lib-df4a0e82596c10c2c41f86168ff3d0ce3db60efa.tar.gz |
Minor clean ups (#87)
* Remove accidental duplication of example1 source.
* Fix apk paths in README.
8 files changed, 7 insertions, 84 deletions
diff --git a/examples/ex1_standalone_app/README.md b/examples/ex1_standalone_app/README.md index 8e782b1..428dd7d 100644 --- a/examples/ex1_standalone_app/README.md +++ b/examples/ex1_standalone_app/README.md @@ -93,7 +93,7 @@ This folder contains a fully working example of a standalone snippet apk. 1. Install the apk on your phone - adb install -r ./examples/ex1_standalone_app/build/outputs/apk/ex1_standalone_app-debug.apk + adb install -r ./examples/ex1_standalone_app/build/outputs/apk/debug/ex1_standalone_app-debug.apk 1. Use `snippet_shell` from mobly to trigger `getFoo()`: diff --git a/examples/ex1_standalone_app/src/main/java/com/google/android/mobly/snippet/example6/ExampleSnippet.java b/examples/ex1_standalone_app/src/main/java/com/google/android/mobly/snippet/example6/ExampleSnippet.java deleted file mode 100644 index 6f5af65..0000000 --- a/examples/ex1_standalone_app/src/main/java/com/google/android/mobly/snippet/example6/ExampleSnippet.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2016 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -package com.google.android.mobly.snippet.example6; - -import com.google.android.mobly.snippet.Snippet; -import com.google.android.mobly.snippet.rpc.Rpc; - -public class ExampleSnippet implements Snippet { - @Rpc(description = "Returns the given integer with the prefix \"foo\"") - public String getFoo(Integer input) { - return "foo " + input; - } - - @Override - public void shutdown() {} -} diff --git a/examples/ex1_standalone_app/src/main/java/com/google/android/mobly/snippet/example6/ExampleSnippet2.java b/examples/ex1_standalone_app/src/main/java/com/google/android/mobly/snippet/example6/ExampleSnippet2.java deleted file mode 100644 index 10a259e..0000000 --- a/examples/ex1_standalone_app/src/main/java/com/google/android/mobly/snippet/example6/ExampleSnippet2.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2016 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -package com.google.android.mobly.snippet.example6; - -import com.google.android.mobly.snippet.Snippet; -import com.google.android.mobly.snippet.rpc.Rpc; - -import com.google.android.mobly.snippet.rpc.RunOnUiThread; -import java.io.IOException; - -public class ExampleSnippet2 implements Snippet { - @Rpc(description = "Returns the given string with the prefix \"bar\"") - public String getBar(String input) { - return "bar " + input; - } - - @Rpc(description = "Throws an exception") - public String throwSomething() throws IOException { - throw new IOException("Example exception from throwSomething()"); - } - - @Rpc(description = "Throws an exception from the main thread") - // @RunOnUiThread makes this method execute on the main thread, but only has effect when - // invoked as an RPC. It does not affect how this method executes if invoked directly in Java. - // This annotation can also be applied to the constructor and the shutdown() method. - @RunOnUiThread - public String throwSomethingFromMainThread() throws IOException { - throw new IOException("Example exception from throwSomethingFromMainThread()"); - } - - @Override - public void shutdown() {} -} diff --git a/examples/ex2_espresso/README.md b/examples/ex2_espresso/README.md index 6d9053f..ba00469 100644 --- a/examples/ex2_espresso/README.md +++ b/examples/ex2_espresso/README.md @@ -111,7 +111,7 @@ to automate a simple app. 1. Install the apk on your phone - adb install -r ./examples/ex2_espresso/build/outputs/apk/ex2_espresso-snippet-debug.apk + adb install -r ./examples/ex2_espresso/build/outputs/apk/debug/ex2_espresso-snippet-debug.apk 1. Use `snippet_shell` from mobly to trigger `pushMainButton()`: diff --git a/examples/ex3_async_event/README.md b/examples/ex3_async_event/README.md index 04ceae9..edb4fbd 100644 --- a/examples/ex3_async_event/README.md +++ b/examples/ex3_async_event/README.md @@ -15,7 +15,7 @@ This folder contains a fully working example of a standalone snippet apk. 1. Install the apk on your phone - adb install -r ./examples/ex3_async_event/build/outputs/apk/ex3_async_event-debug.apk + adb install -r ./examples/ex3_async_event/build/outputs/apk/debug/ex3_async_event-debug.apk 1. Use `snippet_shell` from mobly to trigger `tryEvent()`: diff --git a/examples/ex4_uiautomator/README.md b/examples/ex4_uiautomator/README.md index 3189b59..10fb144 100644 --- a/examples/ex4_uiautomator/README.md +++ b/examples/ex4_uiautomator/README.md @@ -26,8 +26,8 @@ UIAutomator to automate a simple app. 1. Install the apks on your phone - adb install -r ./examples/ex2_espresso/build/outputs/apk/ex2_espresso-main-debug.apk - adb install -r ./examples/ex4_uiautomator/build/outputs/apk/ex4_uiautomator-debug.apk + adb install -r ./examples/ex2_espresso/build/outputs/apk/debug/ex2_espresso-main-debug.apk + adb install -r ./examples/ex4_uiautomator/build/outputs/apk/debug/ex4_uiautomator-debug.apk 1. Use `snippet_shell` from mobly to trigger `pushMainButton()`: diff --git a/examples/ex5_schedule_rpc/README.md b/examples/ex5_schedule_rpc/README.md index b3dfb3a..919f155 100644 --- a/examples/ex5_schedule_rpc/README.md +++ b/examples/ex5_schedule_rpc/README.md @@ -41,7 +41,7 @@ This folder contains a fully working example of a standalone snippet apk. 1. Install the apk on your phone - adb install -r ./examples/ex5_schedule_rpc/build/outputs/apk/ex5_schedule_rpc-debug.apk + adb install -r ./examples/ex5_schedule_rpc/build/outputs/apk/debug/ex5_schedule_rpc-debug.apk 1. Use `snippet_shell` from mobly to trigger `tryEvent()`: diff --git a/examples/ex6_complex_type_conversion/README.md b/examples/ex6_complex_type_conversion/README.md index 70d0289..104d91b 100644 --- a/examples/ex6_complex_type_conversion/README.md +++ b/examples/ex6_complex_type_conversion/README.md @@ -96,7 +96,7 @@ This folder contains a fully working example of a standalone snippet apk. 1. Install the apk on your phone - adb install -r ./examples/ex6_complex_type_conversion/build/outputs/apk/ex6_complex_type_conversion-debug.apk + adb install -r ./examples/ex6_complex_type_conversion/build/outputs/apk/debug/ex6_complex_type_conversion-debug.apk 1. Use Mobly's `snippet_shell` from mobly to trigger the Rpc methods: |