Skip to content

Commit

Permalink
Added support for Xamarin.Android
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterderycke committed Feb 26, 2014
1 parent 61a52fd commit 2c0033a
Show file tree
Hide file tree
Showing 22 changed files with 708 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ TestResults/
*.nupkg
packages/*
!packages/repositories.config
*.zip
*.zip
*.userprefs
103 changes: 103 additions & 0 deletions Jace.Android.Tests/Jace.Android.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?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>12.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{1F3440D3-2C9E-48E1-A90E-F0AD2EC86421}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<RootNamespace>Jace.Android.Tests</RootNamespace>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<AssemblyName>Jace.Android.Tests</AssemblyName>
<TargetFrameworkVersion>v4.0.3</TargetFrameworkVersion>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;__MOBILE__;__ANDROID__;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
<ConsolePause>false</ConsolePause>
<EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<DefineConstants>__MOBILE__;__ANDROID__;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Mono.Android" />
<Reference Include="Xamarin.Android.NUnitLite" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
<Compile Include="Resources\Resource.designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="..\Jace.Tests\AssertExtensions.cs">
<Link>AssertExtensions.cs</Link>
</Compile>
<Compile Include="..\Jace.Tests\CalculationEngineTests.cs">
<Link>CalculationEngineTests.cs</Link>
</Compile>
<Compile Include="..\Jace.Tests\AstBuilderTests.cs">
<Link>AstBuilderTests.cs</Link>
</Compile>
<Compile Include="..\Jace.Tests\BasicInterpreterTests.cs">
<Link>BasicInterpreterTests.cs</Link>
</Compile>
<Compile Include="..\Jace.Tests\ConstantRegistryTests.cs">
<Link>ConstantRegistryTests.cs</Link>
</Compile>
<Compile Include="..\Jace.Tests\FuncAdapterTests.cs">
<Link>FuncAdapterTests.cs</Link>
</Compile>
<Compile Include="..\Jace.Tests\FunctionRegistryTests.cs">
<Link>FunctionRegistryTests.cs</Link>
</Compile>
<Compile Include="..\Jace.Tests\MemoryCacheTests.cs">
<Link>MemoryCacheTests.cs</Link>
</Compile>
<Compile Include="..\Jace.Tests\TokenReaderTests.cs">
<Link>TokenReaderTests.cs</Link>
</Compile>
<Compile Include="..\Jace.Tests\Mocks\MockFunctionRegistry.cs">
<Link>Mocks\MockFunctionRegistry.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="Properties\AndroidManifest.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\Icon.png" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
<ItemGroup>
<Folder Include="Assets\" />
<Folder Include="Mocks\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Jace.Android\Jace.Android.csproj">
<Project>{C19E885A-0232-43BF-8EC5-06C245319525}</Project>
<Name>Jace.Android</Name>
</ProjectReference>
</ItemGroup>
</Project>
23 changes: 23 additions & 0 deletions Jace.Android.Tests/MainActivity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System.Reflection;
using Android.App;
using Android.OS;
using Xamarin.Android.NUnitLite;

namespace Jace.Android.Tests
{
[Activity (Label = "Jace.Android.Tests", MainLauncher = true)]
public class MainActivity : TestSuiteActivity
{
protected override void OnCreate (Bundle bundle)
{
// tests can be inside the main assembly
AddTest (Assembly.GetExecutingAssembly ());
// or in any reference assemblies
// AddTest (typeof (Your.Library.TestClass).Assembly);

// Once you called base.OnCreate(), you cannot add more assemblies.
base.OnCreate (bundle);
}
}
}

5 changes: 5 additions & 0 deletions Jace.Android.Tests/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="Jace.Android.Tests">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="14" />
<application android:label="Jace.Android.Tests"></application>
</manifest>
23 changes: 23 additions & 0 deletions Jace.Android.Tests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using Android.App;

// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle ("Jace.Android.Tests")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyProduct ("")]
[assembly: AssemblyCopyright ("Pieter")]
[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.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("")]

207 changes: 207 additions & 0 deletions Jace.Android.Tests/Resources/Resource.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Jace.Android.Tests/Resources/drawable/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2c0033a

Please sign in to comment.