From 96e5091c2ffdd7ad1696224af2c5350404649e1e Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Sat, 30 May 2009 01:32:17 +0000 Subject: Add SettingsActivity base test git-svn-id: https://connectbot.googlecode.com/svn/trunk/connectbot@241 df292f66-193f-0410-a5fc-6d59da041ff2 --- tests/src/org/connectbot/SettingsActivityTest.java | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 tests/src/org/connectbot/SettingsActivityTest.java (limited to 'tests') diff --git a/tests/src/org/connectbot/SettingsActivityTest.java b/tests/src/org/connectbot/SettingsActivityTest.java new file mode 100644 index 0000000..881ee07 --- /dev/null +++ b/tests/src/org/connectbot/SettingsActivityTest.java @@ -0,0 +1,47 @@ +/* + ConnectBot: simple, powerful, open-source SSH client for Android + Copyright (C) 2007-2008 Kenny Root, Jeffrey Sharkey + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ +package org.connectbot; + +import android.test.ActivityInstrumentationTestCase2; + +/** + * This is a simple framework for a test of an Application. See + * {@link android.test.ApplicationTestCase ApplicationTestCase} for more + * information on how to write and extend Application tests. + *

+ * To run this test, you can type: + * adb shell am instrument -w \ + * -e class org.connectbot.HostListActivityTest \ + * org.connectbot.tests/android.test.InstrumentationTestRunner + */ +public class SettingsActivityTest extends + ActivityInstrumentationTestCase2 { + + public SettingsActivityTest() { + super("org.connectbot", SettingsActivity.class); + } + + public void testOpenMenu() { + SettingsActivity a = getActivity(); + + a.openOptionsMenu(); + + a.closeOptionsMenu(); + } + +} -- cgit v1.2.3