Permalink
Browse files

Initial code drop

  • Loading branch information...
0 parents commit 867716541e2271ff03d58bc8cd8309ec3ec2641e @spouliot committed Oct 30, 2011
Showing with 1,660 additions and 0 deletions.
  1. +5 −0 .gitignore
  2. +38 −0 Andr.Unit.sln
  3. +122 −0 Andr.Unit/Andr.Unit.csproj
  4. +19 −0 Andr.Unit/Assets/AboutAssets.txt
  5. +24 −0 Andr.Unit/MainActivity.cs
  6. +27 −0 Andr.Unit/Properties/AssemblyInfo.cs
  7. +44 −0 Andr.Unit/Resources/AboutResources.txt
  8. +151 −0 Andr.Unit/Resources/Resource.designer.cs
  9. BIN Andr.Unit/Resources/drawable/Icon.png
  10. +14 −0 Andr.Unit/Resources/layout/Main.axml
  11. +5 −0 Andr.Unit/Resources/values/Strings.xml
  12. +35 −0 Android.NUnitLite/AndrRunner/Activities/CreditsActivity.cs
  13. +75 −0 Android.NUnitLite/AndrRunner/Activities/OptionsActivity.cs
  14. +92 −0 Android.NUnitLite/AndrRunner/Activities/RunnerActivity.cs
  15. +40 −0 Android.NUnitLite/AndrRunner/Activities/TestResultActivity.cs
  16. +71 −0 Android.NUnitLite/AndrRunner/Activities/TestSuiteActivity.cs
  17. +153 −0 Android.NUnitLite/AndrRunner/AndroidRunner.cs
  18. +30 −0 Android.NUnitLite/AndrRunner/Elements/ActionElement.cs
  19. +32 −0 Android.NUnitLite/AndrRunner/Elements/ActivityElement.cs
  20. +61 −0 Android.NUnitLite/AndrRunner/Elements/FormattedElement.cs
  21. +37 −0 Android.NUnitLite/AndrRunner/Elements/FormattedSection.cs
  22. +65 −0 Android.NUnitLite/AndrRunner/Elements/TestCaseElement.cs
  23. +42 −0 Android.NUnitLite/AndrRunner/Elements/TestElement.cs
  24. +72 −0 Android.NUnitLite/AndrRunner/Elements/TestSuiteElement.cs
  25. +291 −0 Android.NUnitLite/Android.NUnitLite.csproj
  26. +34 −0 README.md
  27. +28 −0 m4a.tests/RunnerTest.cs
  28. +53 −0 m4a.tests/m4a.tests.csproj
@@ -0,0 +1,5 @@
+*.userprefs
+*.pidb
+bin/
+obj/
+
@@ -0,0 +1,38 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Andr.Unit", "Andr.Unit\Andr.Unit.csproj", "{47673BC8-F954-4304-9472-2773AA5A94EB}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDroid.Dialog", "..\MonoDroid.Dialog\MonoDroid.Dialog\MonoDroid.Dialog.csproj", "{33044C7B-47A4-4113-A61A-EB429407F818}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Android.NUnitLite", "Android.NUnitLite\Android.NUnitLite.csproj", "{6A005891-A3D6-4398-A729-F645397D573A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "m4a.tests", "m4a.tests\m4a.tests.csproj", "{06D00E82-E637-4A8A-95BE-3E1ADE925B9B}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {06D00E82-E637-4A8A-95BE-3E1ADE925B9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {06D00E82-E637-4A8A-95BE-3E1ADE925B9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {06D00E82-E637-4A8A-95BE-3E1ADE925B9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {06D00E82-E637-4A8A-95BE-3E1ADE925B9B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {33044C7B-47A4-4113-A61A-EB429407F818}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {33044C7B-47A4-4113-A61A-EB429407F818}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {33044C7B-47A4-4113-A61A-EB429407F818}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {33044C7B-47A4-4113-A61A-EB429407F818}.Release|Any CPU.Build.0 = Release|Any CPU
+ {47673BC8-F954-4304-9472-2773AA5A94EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {47673BC8-F954-4304-9472-2773AA5A94EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {47673BC8-F954-4304-9472-2773AA5A94EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {47673BC8-F954-4304-9472-2773AA5A94EB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6A005891-A3D6-4398-A729-F645397D573A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6A005891-A3D6-4398-A729-F645397D573A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6A005891-A3D6-4398-A729-F645397D573A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6A005891-A3D6-4398-A729-F645397D573A}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = Andr.Unit\Andr.Unit.csproj
+ EndGlobalSection
+EndGlobal
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{47673BC8-F954-4304-9472-2773AA5A94EB}</ProjectGuid>
+ <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <RootNamespace>Andr.Unit</RootNamespace>
+ <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
+ <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
+ <AndroidResgenClass>Resource</AndroidResgenClass>
+ <AndroidApplication>True</AndroidApplication>
+ <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
+ <AssemblyName>Andr.Unit</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <AndroidLinkMode>None</AndroidLinkMode>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
+ <AndroidLinkMode>SdkOnly</AndroidLinkMode>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Core" />
+ <Reference Include="Mono.Android" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Resources\Resource.designer.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="MainActivity.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Resources\AboutResources.txt" />
+ <None Include="Assets\AboutAssets.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidResource Include="Resources\layout\Main.axml" />
+ <AndroidResource Include="Resources\values\Strings.xml" />
+ <AndroidResource Include="Resources\drawable\Icon.png" />
+ <AndroidResource Include="..\..\MonoDroid.Dialog\DialogSampleApp\Resources\layout\dialog_achievements.xml">
+ <Link>Resources\layout\dialog_achievements.xml</Link>
+ </AndroidResource>
+ <AndroidResource Include="..\..\MonoDroid.Dialog\DialogSampleApp\Resources\layout\dialog_boolfieldleft.xml">
+ <Link>Resources\layout\dialog_boolfieldleft.xml</Link>
+ </AndroidResource>
+ <AndroidResource Include="..\..\MonoDroid.Dialog\DialogSampleApp\Resources\layout\dialog_boolfieldright.xml">
+ <Link>Resources\layout\dialog_boolfieldright.xml</Link>
+ </AndroidResource>
+ <AndroidResource Include="..\..\MonoDroid.Dialog\DialogSampleApp\Resources\layout\dialog_boolfieldsubleft.xml">
+ <Link>Resources\layout\dialog_boolfieldsubleft.xml</Link>
+ </AndroidResource>
+ <AndroidResource Include="..\..\MonoDroid.Dialog\DialogSampleApp\Resources\layout\dialog_boolfieldsubright.xml">
+ <Link>Resources\layout\dialog_boolfieldsubright.xml</Link>
+ </AndroidResource>
+ <AndroidResource Include="..\..\MonoDroid.Dialog\DialogSampleApp\Resources\layout\dialog_button.xml">
+ <Link>Resources\layout\dialog_button.xml</Link>
+ </AndroidResource>
+ <AndroidResource Include="..\..\MonoDroid.Dialog\DialogSampleApp\Resources\layout\dialog_datefield.xml">
+ <Link>Resources\layout\dialog_datefield.xml</Link>
+ </AndroidResource>
+ <AndroidResource Include="..\..\MonoDroid.Dialog\DialogSampleApp\Resources\layout\dialog_fieldsetlabel.xml">
+ <Link>Resources\layout\dialog_fieldsetlabel.xml</Link>
+ </AndroidResource>
+ <AndroidResource Include="..\..\MonoDroid.Dialog\DialogSampleApp\Resources\layout\dialog_labelfieldbelow.xml">
+ <Link>Resources\layout\dialog_labelfieldbelow.xml</Link>
+ </AndroidResource>
+ <AndroidResource Include="..\..\MonoDroid.Dialog\DialogSampleApp\Resources\layout\dialog_labelfieldright.xml">
+ <Link>Resources\layout\dialog_labelfieldright.xml</Link>
+ </AndroidResource>
+ <AndroidResource Include="..\..\MonoDroid.Dialog\DialogSampleApp\Resources\layout\dialog_onofffieldright.xml">
+ <Link>Resources\layout\dialog_onofffieldright.xml</Link>
+ </AndroidResource>
+ <AndroidResource Include="..\..\MonoDroid.Dialog\DialogSampleApp\Resources\layout\dialog_panel.xml">
+ <Link>Resources\layout\dialog_panel.xml</Link>
+ </AndroidResource>
+ <AndroidResource Include="..\..\MonoDroid.Dialog\DialogSampleApp\Resources\layout\dialog_selectlist.xml">
+ <Link>Resources\layout\dialog_selectlist.xml</Link>
+ </AndroidResource>
+ <AndroidResource Include="..\..\MonoDroid.Dialog\DialogSampleApp\Resources\layout\dialog_selectlistfield.xml">
+ <Link>Resources\layout\dialog_selectlistfield.xml</Link>
+ </AndroidResource>
+ <AndroidResource Include="..\..\MonoDroid.Dialog\DialogSampleApp\Resources\layout\dialog_textarea.xml">
+ <Link>Resources\layout\dialog_textarea.xml</Link>
+ </AndroidResource>
+ <AndroidResource Include="..\..\MonoDroid.Dialog\DialogSampleApp\Resources\layout\dialog_textfieldbelow.xml">
+ <Link>Resources\layout\dialog_textfieldbelow.xml</Link>
+ </AndroidResource>
+ <AndroidResource Include="..\..\MonoDroid.Dialog\DialogSampleApp\Resources\layout\dialog_textfieldright.xml">
+ <Link>Resources\layout\dialog_textfieldright.xml</Link>
+ </AndroidResource>
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
+ <ItemGroup>
+ <ProjectReference Include="..\Android.NUnitLite\Android.NUnitLite.csproj">
+ <Project>{6A005891-A3D6-4398-A729-F645397D573A}</Project>
+ <Name>Android.NUnitLite</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\m4a.tests\m4a.tests.csproj">
+ <Project>{06D00E82-E637-4A8A-95BE-3E1ADE925B9B}</Project>
+ <Name>m4a.tests</Name>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
@@ -0,0 +1,19 @@
+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories) and given a Build Action of "AndroidAsset".
+
+These files will be deployed with you package and will be accessible using Android's
+AssetManager, like this:
+
+public class ReadAsset : Activity
+{
+ protected override void OnCreate (Bundle bundle)
+ {
+ base.OnCreate (bundle);
+
+ InputStream input = Assets.Open ("my_asset.txt");
+ }
+}
+
+Additionally, some Android functions will automatically load asset files:
+
+Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
@@ -0,0 +1,24 @@
+using System.Reflection;
+
+using Android.App;
+using Android.OS;
+using Android.NUnitLite.UI;
+
+namespace Andr.Unit {
+
+ [Activity (Label = "Xamarin's Andr.Unit", MainLauncher = true)]
+ public class MainActivity : RunnerActivity {
+
+ protected override void OnCreate (Bundle bundle)
+ {
+ // tests can be inside the main assembly
+ Add (Assembly.GetExecutingAssembly ());
+ // or in any reference assemblies
+ Add (typeof (m4a.tests.RunnerTest).Assembly);
+ // or in any assembly that you load (since JIT is available)
+
+ // you cannot add more assemblies once calling base
+ base.OnCreate (bundle);
+ }
+ }
+}
@@ -0,0 +1,27 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("Andr.Unit")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("poupou")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+
@@ -0,0 +1,44 @@
+Images, layout descriptions, binary blobs and string dictionaries can be included
+in your application as resource files. Various Android APIs are designed to
+operate on the resource IDs instead of dealing with images, strings or binary blobs
+directly.
+
+For example, a sample Android app that contains a user interface layout (main.axml),
+an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
+would keep its resources in the "Resources" directory of the application:
+
+Resources/
+ drawable/
+ icon.png
+
+ layout/
+ main.axml
+
+ values/
+ strings.xml
+
+In order to get the build system to recognize Android resources, set the build action to
+"AndroidResource". The native Android APIs do not operate directly with filenames, but
+instead operate on resource IDs. When you compile an Android application that uses resources,
+the build system will package the resources for distribution and generate a class called "R"
+(this is an Android convention) that contains the tokens for each one of the resources
+included. For example, for the above Resources layout, this is what the R class would expose:
+
+public class R {
+ public class drawable {
+ public const int icon = 0x123;
+ }
+
+ public class layout {
+ public const int main = 0x456;
+ }
+
+ public class strings {
+ public const int first_string = 0xabc;
+ public const int second_string = 0xbcd;
+ }
+}
+
+You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
+to reference the layout/main.axml file, or R.strings.first_string to reference the first
+string in the dictionary file values/strings.xml.
Oops, something went wrong.

0 comments on commit 8677165

Please sign in to comment.