Skip to content

Commit 598a601

Browse files
author
Alex Chmyr
committed
Initial commit
0 parents  commit 598a601

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+798
-0
lines changed

Diff for: .gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.gradle
2+
/local.properties
3+
/.idea/workspace.xml
4+
/.idea/libraries
5+
.DS_Store
6+
/build

Diff for: app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

Diff for: app/build.gradle

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 21
5+
buildToolsVersion "21.1.1"
6+
7+
defaultConfig {
8+
applicationId "acm.androidfitnesseexample"
9+
minSdkVersion 14
10+
targetSdkVersion 21
11+
versionCode 1
12+
versionName "1.0"
13+
}
14+
buildTypes {
15+
release {
16+
minifyEnabled false
17+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18+
}
19+
}
20+
}
21+
22+
dependencies {
23+
compile fileTree(dir: 'libs', include: ['*.jar'])
24+
compile 'com.android.support:appcompat-v7:21.0.3'
25+
}

Diff for: app/libs/fitnesse-slim.jar

169 KB
Binary file not shown.

Diff for: app/proguard-rules.pro

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /Users/achmyr/app/android-sdk-macosx/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package acm.androidfitnesseexample;
2+
3+
import android.app.Application;
4+
import android.test.ApplicationTestCase;
5+
6+
/**
7+
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
8+
*/
9+
public class ApplicationTest extends ApplicationTestCase<Application> {
10+
public ApplicationTest() {
11+
super(Application.class);
12+
}
13+
}

Diff for: app/src/main/AndroidManifest.xml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="acm.androidfitnesseexample" >
4+
5+
<uses-permission android:name="android.permission.INTERNET"/>
6+
<application
7+
android:name=".AndroidFitnesseExampleApplication"
8+
android:allowBackup="true"
9+
android:icon="@mipmap/ic_launcher"
10+
android:label="@string/app_name"
11+
android:theme="@style/AppTheme" >
12+
<activity
13+
android:name=".DefaultActivity"
14+
android:label="@string/title_activity_default" >
15+
<intent-filter>
16+
<action android:name="android.intent.action.MAIN" />
17+
<category android:name="android.intent.category.LAUNCHER" />
18+
</intent-filter>
19+
</activity>
20+
</application>
21+
22+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package acm.androidfitnesseexample;
2+
3+
import android.app.Application;
4+
import android.os.AsyncTask;
5+
6+
import java.io.IOException;
7+
8+
import fitnesse.slim.JavaSlimFactory;
9+
import fitnesse.slim.SlimService;
10+
11+
/**
12+
* Created in February.
13+
*/
14+
public class AndroidFitnesseExampleApplication extends Application {
15+
16+
@Override
17+
public void onCreate() {
18+
new SlimClientTask().execute();
19+
}
20+
21+
22+
class SlimClientTask extends AsyncTask<String, Void, Void> {
23+
24+
protected Void doInBackground(String... urls) {
25+
26+
SlimService.Options options = SlimService.parseCommandLine(new String[]{"-v", "-d", "8099"});
27+
try {
28+
SlimService.startWithFactory(JavaSlimFactory.createJavaSlimFactory(options), options);
29+
} catch (IOException e) {
30+
e.printStackTrace();
31+
}
32+
return null;
33+
}
34+
}
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package acm.androidfitnesseexample;
2+
3+
import android.os.Bundle;
4+
import android.support.v7.app.ActionBarActivity;
5+
import android.widget.TextView;
6+
7+
public class DefaultActivity extends ActionBarActivity implements MessageInterface {
8+
9+
private TextView mMessage;
10+
11+
@Override
12+
protected void onCreate(Bundle savedInstanceState) {
13+
super.onCreate(savedInstanceState);
14+
setContentView(R.layout.activity_default);
15+
mMessage = (TextView) findViewById(R.id.message);
16+
}
17+
18+
@Override
19+
public void showMessage(String text) {
20+
mMessage.setText(text);
21+
}
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package acm.androidfitnesseexample;
2+
3+
/**
4+
* Created in February.
5+
*/
6+
public interface MessageInterface {
7+
void showMessage(String text);
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package acm.androidfitnesseexample;
2+
3+
/**
4+
* Created in February.
5+
*/
6+
public class MessagePresenter {
7+
8+
private MessageInterface mMessageInterface;
9+
private String mText;
10+
11+
public MessagePresenter(MessageInterface messageInterface) {
12+
13+
mMessageInterface = messageInterface;
14+
}
15+
16+
public void read(String text) {
17+
mText = text;
18+
}
19+
20+
public void produceAnswer() {
21+
mMessageInterface.showMessage(mText);
22+
}
23+
}

Diff for: app/src/main/java/fixtures/SayHelloFixture.java

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package fixtures;
2+
3+
import acm.androidfitnesseexample.MessageInterface;
4+
import acm.androidfitnesseexample.MessagePresenter;
5+
6+
/**
7+
* Created in February.
8+
*/
9+
public class SayHelloFixture implements MessageInterface {
10+
11+
private String mMessage;
12+
private final MessagePresenter mMessagePresenter;
13+
14+
public SayHelloFixture() {
15+
mMessagePresenter = new MessagePresenter(this);
16+
}
17+
18+
public void iSay(String text) {
19+
mMessagePresenter.read(text);
20+
}
21+
22+
public void waitingForAnswer() {
23+
mMessagePresenter.produceAnswer();
24+
}
25+
26+
public String answer() {
27+
return mMessage;
28+
}
29+
30+
@Override
31+
public void showMessage(String text) {
32+
mMessage = text;
33+
}
34+
}

Diff for: app/src/main/res/layout/activity_default.xml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:paddingLeft="@dimen/activity_horizontal_margin"
6+
android:paddingRight="@dimen/activity_horizontal_margin"
7+
android:paddingTop="@dimen/activity_vertical_margin"
8+
android:paddingBottom="@dimen/activity_vertical_margin"
9+
tools:context="acm.androidfitnesseexample.DefaultActivity">
10+
11+
<TextView
12+
android:text="@string/hello_world"
13+
android:id="@+id/message"
14+
android:layout_width="wrap_content"
15+
android:layout_height="wrap_content"/>
16+
17+
</RelativeLayout>

Diff for: app/src/main/res/menu/menu_default.xml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<menu xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:app="http://schemas.android.com/apk/res-auto"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
tools:context="acm.androidfitnesseexample.DefaultActivity">
5+
<item android:id="@+id/action_settings"
6+
android:title="@string/action_settings"
7+
android:orderInCategory="100"
8+
app:showAsAction="never"/>
9+
</menu>

Diff for: app/src/main/res/mipmap-hdpi/ic_launcher.png

3.34 KB
Loading

Diff for: app/src/main/res/mipmap-mdpi/ic_launcher.png

2.15 KB
Loading

Diff for: app/src/main/res/mipmap-xhdpi/ic_launcher.png

4.73 KB
Loading

Diff for: app/src/main/res/mipmap-xxhdpi/ic_launcher.png

7.54 KB
Loading

Diff for: app/src/main/res/values-w820dp/dimens.xml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<resources>
2+
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
3+
(such as screen margins) for screens with more than 820dp of available width. This
4+
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
5+
<dimen name="activity_horizontal_margin">64dp</dimen>
6+
</resources>

Diff for: app/src/main/res/values/dimens.xml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<resources>
2+
<!-- Default screen margins, per the Android Design guidelines. -->
3+
<dimen name="activity_horizontal_margin">16dp</dimen>
4+
<dimen name="activity_vertical_margin">16dp</dimen>
5+
</resources>

Diff for: app/src/main/res/values/strings.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<resources>
2+
<string name="app_name">Android Fitnesse Example</string>
3+
<string name="title_activity_default">DefaultActivity</string>
4+
5+
<string name="hello_world">Hello world!</string>
6+
<string name="action_settings">Settings</string>
7+
</resources>

Diff for: app/src/main/res/values/styles.xml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<resources>
2+
3+
<!-- Base application theme. -->
4+
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
5+
<!-- Customize your theme here. -->
6+
</style>
7+
8+
</resources>

Diff for: build.gradle

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
3+
buildscript {
4+
repositories {
5+
jcenter()
6+
}
7+
dependencies {
8+
classpath 'com.android.tools.build:gradle:1.0.1'
9+
10+
// NOTE: Do not place your application dependencies here; they belong
11+
// in the individual module build.gradle files
12+
}
13+
}
14+
15+
allprojects {
16+
repositories {
17+
jcenter()
18+
}
19+
}

Diff for: fitnesse/FitNesseRoot/.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
properties
2+
updateList
3+
updateDoNotCopyOverList
4+
ErrorLogs/*
5+
FitNesse/*
6+
files/testResults/*
7+
files/testProgress/*
8+
.svn
9+
.DS_Store
10+
desktop.ini
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
This is a sample test script that supposed to be executed as part of Android application
2+
3+
|script|fixtures.SayHelloFixture|
4+
|i say |hello |
5+
|waiting for answer |
6+
|check|answer |hello |
7+
8+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<properties>
3+
<Edit>true</Edit>
4+
<Files>true</Files>
5+
<Properties>true</Properties>
6+
<RecentChanges>true</RecentChanges>
7+
<Refactor>true</Refactor>
8+
<Search>true</Search>
9+
<Test>true</Test>
10+
<Versions>true</Versions>
11+
<WhereUsed>true</WhereUsed>
12+
</properties>

Diff for: fitnesse/FitNesseRoot/ExampleSuite/content.txt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
!contents -R2 -g -p -f -h
2+
3+
!define TEST_SYSTEM {slim}
4+
!define SLIM_VERSION {0.4}
5+
!define SLIM_HOST {localhost}
6+
!define SLIM_PORT {8099}
7+
!define slim.pool.size {1}
8+
!define DEVICE {tablet}

Diff for: fitnesse/FitNesseRoot/ExampleSuite/properties.xml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<properties>
3+
<Edit/>
4+
<Files/>
5+
<Properties/>
6+
<RecentChanges/>
7+
<Refactor/>
8+
<Search/>
9+
<Suite/>
10+
<Versions/>
11+
<WhereUsed/>
12+
</properties>

Diff for: fitnesse/FitNesseRoot/FrontPage/content.txt

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
!1 Here the [[ExampleSuite][ExampleSuite]]
2+
!1
3+
!1 Welcome to [[FitNesse][FitNesse.FitNesse]]!
4+
!3 ''The fully integrated stand-alone acceptance testing framework and wiki.''
5+
# Here is a good place to add your first page (WikiWord). For example, MyTopLevelApplicationPage
6+
7+
To add your first "page", click the [[Edit][FrontPage?edit]] button and add a [[!-WikiWord-!][FitNesse.UserGuide.FitNesseWiki.WikiWord]] to the page.
8+
9+
| '''To Learn More...''' |
10+
| [[A One-Minute Description][.FitNesse.UserGuide.OneMinuteDescription]] | ''What is FitNesse Start here.'' |
11+
| [[A Two-Minute Example][.FitNesse.UserGuide.TwoMinuteExample]] | ''A brief example. Read this one next.'' |
12+
| [[User Guide][.FitNesse.UserGuide]] | ''Answer the rest of your questions here.'' |
13+
| [[Acceptance Tests][.FitNesse.SuiteAcceptanceTests]] | ''FitNesse's suite of Acceptance Tests'' |
14+
| [[Release Notes][.FitNesse.ReleaseNotes]] | ''Find out about FitNesse's new features'' |
15+
16+
!note Release ${FITNESSE_VERSION}
17+

Diff for: fitnesse/FitNesseRoot/FrontPage/properties.xml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<properties>
3+
<AddChild/>
4+
<Edit/>
5+
<Files/>
6+
<Properties/>
7+
<Prune/>
8+
<RecentChanges/>
9+
<Search/>
10+
<Static/>
11+
<Versions/>
12+
<WhereUsed/>
13+
</properties>

Diff for: fitnesse/FitNesseRoot/PageFooter/content.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[[Front Page][.FrontPage]] | [[User Guide][.FitNesse.UserGuide]] | [[root][root]] (for global !-!path's-!, ''etc.'') | Press '?' for keyboard shortcuts [[(edit)][.PageFooter?edit]]

0 commit comments

Comments
 (0)