Skip to content

Commit d2649f7

Browse files
committed
iOS tests
1 parent 8f47732 commit d2649f7

8 files changed

Lines changed: 484 additions & 36 deletions

File tree

SQLitePCL.pretty.sln

Lines changed: 203 additions & 35 deletions
Large diffs are not rendered by default.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Reflection;
5+
using Foundation;
6+
using UIKit;
7+
8+
using Xunit.Runner;
9+
using Xunit.Sdk;
10+
11+
12+
namespace SQLitePCL.pretty.tests.iOS
13+
{
14+
// The UIApplicationDelegate for the application. This class is responsible for launching the
15+
// User Interface of the application, as well as listening (and optionally responding) to
16+
// application events from iOS.
17+
[Register("AppDelegate")]
18+
public partial class AppDelegate : RunnerAppDelegate
19+
{
20+
21+
//
22+
// This method is invoked when the application has loaded and is ready to run. In this
23+
// method you should instantiate the window, load the UI into it and then make the window
24+
// visible.
25+
//
26+
// You have 17 seconds to return from this method, or iOS will terminate your application.
27+
//
28+
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
29+
{
30+
AddTestAssembly(typeof(SQLitePCL.pretty.tests.SQLiteDatabaseConnectionTests).Assembly);
31+
32+
#if false
33+
// you can use the default or set your own custom writer (e.g. save to web site and tweet it ;-)
34+
Writer = new TcpTextWriter ("10.0.1.2", 16384);
35+
// start running the test suites as soon as the application is loaded
36+
AutoStart = true;
37+
// crash the application (to ensure it's ended) and return to springboard
38+
TerminateAfterExecution = true;
39+
#endif
40+
return base.FinishedLaunching(app, options);
41+
}
42+
}
43+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
</dict>
6+
</plist>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDisplayName</key>
6+
<string>SQLitePCL.pretty.tests.iOS</string>
7+
<key>CFBundleIdentifier</key>
8+
<string>com.your-company.SQLitePCL.pretty.tests.iOS</string>
9+
<key>CFBundleShortVersionString</key>
10+
<string>1.0</string>
11+
<key>CFBundleVersion</key>
12+
<string>1.0</string>
13+
<key>LSRequiresIPhoneOS</key>
14+
<true/>
15+
<key>MinimumOSVersion</key>
16+
<string>8.0</string>
17+
<key>UIDeviceFamily</key>
18+
<array>
19+
<integer>1</integer>
20+
<integer>2</integer>
21+
</array>
22+
<key>UILaunchStoryboardName</key>
23+
<string>LaunchScreen</string>
24+
<key>UIRequiredDeviceCapabilities</key>
25+
<array>
26+
<string>armv7</string>
27+
</array>
28+
<key>UISupportedInterfaceOrientations</key>
29+
<array>
30+
<string>UIInterfaceOrientationPortrait</string>
31+
<string>UIInterfaceOrientationLandscapeLeft</string>
32+
<string>UIInterfaceOrientationLandscapeRight</string>
33+
</array>
34+
<key>UISupportedInterfaceOrientations~ipad</key>
35+
<array>
36+
<string>UIInterfaceOrientationPortrait</string>
37+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
38+
<string>UIInterfaceOrientationLandscapeLeft</string>
39+
<string>UIInterfaceOrientationLandscapeRight</string>
40+
</array>
41+
<key>XSAppIconAssets</key>
42+
<string>Resources/Images.xcassets/AppIcons.appiconset</string>
43+
</dict>
44+
</plist>

SQLitePCL.pretty.tests.iOS/Main.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
5+
using Foundation;
6+
using UIKit;
7+
8+
namespace SQLitePCL.pretty.tests.iOS
9+
{
10+
public class Application
11+
{
12+
// This is the main entry point of the application.
13+
static void Main(string[] args)
14+
{
15+
// if you want to use a different Application Delegate class from "AppDelegate"
16+
// you can specify it here.
17+
UIApplication.Main(args, null, "AppDelegate");
18+
}
19+
}
20+
}
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
6+
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
7+
<ProjectGuid>{641DDEDB-D0E6-47B9-A96E-5567B8D79244}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<RootNamespace>SQLitePCL.pretty.tests.iOS</RootNamespace>
10+
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
11+
<AssemblyName>SQLitePCLprettytestsiOS</AssemblyName>
12+
</PropertyGroup>
13+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
14+
<DebugSymbols>true</DebugSymbols>
15+
<DebugType>full</DebugType>
16+
<Optimize>false</Optimize>
17+
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
18+
<DefineConstants>DEBUG;</DefineConstants>
19+
<ErrorReport>prompt</ErrorReport>
20+
<WarningLevel>4</WarningLevel>
21+
<ConsolePause>false</ConsolePause>
22+
<MtouchArch>i386</MtouchArch>
23+
<MtouchLink>None</MtouchLink>
24+
<MtouchDebug>true</MtouchDebug>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
27+
<DebugType>full</DebugType>
28+
<Optimize>true</Optimize>
29+
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
30+
<ErrorReport>prompt</ErrorReport>
31+
<WarningLevel>4</WarningLevel>
32+
<MtouchArch>i386</MtouchArch>
33+
<ConsolePause>false</ConsolePause>
34+
<MtouchLink>None</MtouchLink>
35+
</PropertyGroup>
36+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
37+
<DebugSymbols>true</DebugSymbols>
38+
<DebugType>full</DebugType>
39+
<Optimize>false</Optimize>
40+
<OutputPath>bin\iPhone\Debug</OutputPath>
41+
<DefineConstants>DEBUG;</DefineConstants>
42+
<ErrorReport>prompt</ErrorReport>
43+
<WarningLevel>4</WarningLevel>
44+
<ConsolePause>false</ConsolePause>
45+
<MtouchArch>ARMv7, ARM64</MtouchArch>
46+
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
47+
<CodesignKey>iPhone Developer</CodesignKey>
48+
<MtouchDebug>true</MtouchDebug>
49+
</PropertyGroup>
50+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
51+
<DebugType>full</DebugType>
52+
<Optimize>true</Optimize>
53+
<OutputPath>bin\iPhone\Release</OutputPath>
54+
<ErrorReport>prompt</ErrorReport>
55+
<WarningLevel>4</WarningLevel>
56+
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
57+
<MtouchArch>ARMv7, ARM64</MtouchArch>
58+
<ConsolePause>false</ConsolePause>
59+
<CodesignKey>iPhone Developer</CodesignKey>
60+
</PropertyGroup>
61+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
62+
<DebugType>full</DebugType>
63+
<Optimize>true</Optimize>
64+
<OutputPath>bin\iPhone\Ad-Hoc</OutputPath>
65+
<ErrorReport>prompt</ErrorReport>
66+
<WarningLevel>4</WarningLevel>
67+
<ConsolePause>false</ConsolePause>
68+
<MtouchArch>ARMv7, ARM64</MtouchArch>
69+
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
70+
<IpaIncludeArtwork>true</IpaIncludeArtwork>
71+
<CodesignKey>iPhone Distribution</CodesignKey>
72+
<CodesignProvision>Automatic:AdHoc</CodesignProvision>
73+
<BuildIpa>true</BuildIpa>
74+
</PropertyGroup>
75+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
76+
<DebugType>full</DebugType>
77+
<Optimize>true</Optimize>
78+
<OutputPath>bin\iPhone\AppStore</OutputPath>
79+
<ErrorReport>prompt</ErrorReport>
80+
<WarningLevel>4</WarningLevel>
81+
<ConsolePause>false</ConsolePause>
82+
<MtouchArch>ARMv7, ARM64</MtouchArch>
83+
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
84+
<CodesignProvision>Automatic:AppStore</CodesignProvision>
85+
<CodesignKey>iPhone Distribution</CodesignKey>
86+
</PropertyGroup>
87+
<ItemGroup>
88+
<Reference Include="System" />
89+
<Reference Include="System.Xml" />
90+
<Reference Include="System.Core" />
91+
<Reference Include="Xamarin.iOS" />
92+
<Reference Include="xunit.abstractions">
93+
<HintPath>..\packages\xunit.abstractions.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.abstractions.dll</HintPath>
94+
</Reference>
95+
<Reference Include="xunit.core">
96+
<HintPath>..\packages\xunit.extensibility.core.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.dll</HintPath>
97+
</Reference>
98+
<Reference Include="xunit.execution.iOS-Universal">
99+
<HintPath>..\packages\xunit.extensibility.execution.2.0.0\lib\Xamarin.iOS\xunit.execution.iOS-Universal.dll</HintPath>
100+
</Reference>
101+
<Reference Include="xunit.runner.utility.iOS-Universal">
102+
<HintPath>..\packages\xunit.runner.utility.2.0.0\lib\Xamarin.iOS\xunit.runner.utility.iOS-Universal.dll</HintPath>
103+
</Reference>
104+
<Reference Include="xunit.assert">
105+
<HintPath>..\packages\xunit.assert.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.assert.dll</HintPath>
106+
</Reference>
107+
<Reference Include="Xamarin.Forms.Platform.iOS">
108+
<HintPath>..\packages\Xamarin.Forms.1.4.0.6341\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll</HintPath>
109+
</Reference>
110+
<Reference Include="Xamarin.Forms.Core">
111+
<HintPath>..\packages\Xamarin.Forms.1.4.0.6341\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
112+
</Reference>
113+
<Reference Include="Xamarin.Forms.Xaml">
114+
<HintPath>..\packages\Xamarin.Forms.1.4.0.6341\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
115+
</Reference>
116+
<Reference Include="xunit.runner.devices">
117+
<HintPath>..\packages\xunit.runner.devices.1.0.0\lib\Xamarin.iOS\xunit.runner.devices.dll</HintPath>
118+
</Reference>
119+
<Reference Include="SQLitePCL.raw">
120+
<HintPath>..\packages\SQLitePCL.raw.0.8.0-pre2\build\Xamarin.iOS10\pinvoke_packaged_sqlite3\anycpu\SQLitePCL.raw.dll</HintPath>
121+
</Reference>
122+
</ItemGroup>
123+
<ItemGroup>
124+
<None Include="Info.plist" />
125+
<None Include="Entitlements.plist" />
126+
<None Include="packages.config" />
127+
</ItemGroup>
128+
<ItemGroup>
129+
<Compile Include="Main.cs" />
130+
<Compile Include="AppDelegate.cs" />
131+
</ItemGroup>
132+
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
133+
<Import Project="..\packages\xunit.core.2.0.0\build\Xamarin.iOS\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.0.0\build\Xamarin.iOS\xunit.core.props')" />
134+
<Import Project="..\packages\Xamarin.Forms.1.4.0.6341\build\portable-win+net45+wp80+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.1.4.0.6341\build\portable-win+net45+wp80+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
135+
<Import Project="..\packages\xunit.runner.devices.1.0.0\build\Xamarin.iOS\xunit.runner.devices.targets" Condition="Exists('..\packages\xunit.runner.devices.1.0.0\build\Xamarin.iOS\xunit.runner.devices.targets')" />
136+
<Import Project="..\packages\SQLitePCL.raw.0.8.0-pre2\build\Xamarin.iOS10\SQLitePCL.raw.targets" Condition="Exists('..\packages\SQLitePCL.raw.0.8.0-pre2\build\Xamarin.iOS10\SQLitePCL.raw.targets')" />
137+
<ItemGroup>
138+
<ProjectReference Include="..\SQLitePCL.pretty.Async\SQLitePCL.pretty.Async.csproj">
139+
<Project>{ED71D4D4-498E-432E-B941-F704CECCF254}</Project>
140+
<Name>SQLitePCL.pretty.Async</Name>
141+
</ProjectReference>
142+
<ProjectReference Include="..\SQLitePCL.pretty\SQLitePCL.pretty.csproj">
143+
<Project>{C6743D26-E16E-41CA-A757-72BE2D7EAF28}</Project>
144+
<Name>SQLitePCL.pretty</Name>
145+
</ProjectReference>
146+
<ProjectReference Include="..\SQLitePCL.pretty.Orm\SQLitePCL.pretty.Orm.csproj">
147+
<Project>{82EF24A8-7B24-42AA-BDB9-7A9F7527DF48}</Project>
148+
<Name>SQLitePCL.pretty.Orm</Name>
149+
</ProjectReference>
150+
<ProjectReference Include="..\SQLitePCL.pretty.Tests\SQLitePCL.pretty.Tests.csproj">
151+
<Project>{3C8B2558-E287-4031-8597-14480A15ED0E}</Project>
152+
<Name>SQLitePCL.pretty.Tests</Name>
153+
</ProjectReference>
154+
</ItemGroup>
155+
</Project>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="SQLitePCL.raw" version="0.8.0-pre2" targetFramework="xamarinios10" />
4+
<package id="Xamarin.Forms" version="1.4.0.6341" targetFramework="xamarinios10" />
5+
<package id="xunit" version="2.0.0" targetFramework="xamarinios10" />
6+
<package id="xunit.abstractions" version="2.0.0" targetFramework="xamarinios10" />
7+
<package id="xunit.assert" version="2.0.0" targetFramework="xamarinios10" />
8+
<package id="xunit.core" version="2.0.0" targetFramework="xamarinios10" />
9+
<package id="xunit.extensibility.core" version="2.0.0" targetFramework="xamarinios10" />
10+
<package id="xunit.extensibility.execution" version="2.0.0" targetFramework="xamarinios10" />
11+
<package id="xunit.runner.devices" version="1.0.0" targetFramework="xamarinios10" />
12+
<package id="xunit.runner.utility" version="2.0.0" targetFramework="xamarinios10" />
13+
</packages>

SQLitePCL.pretty.tests/packages.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
<package id="Rx-Main" version="2.2.5" targetFramework="net45" />
77
<package id="Rx-PlatformServices" version="2.2.5" targetFramework="net45" />
88
<package id="SQLitePCL.raw" version="0.8.0-pre2" targetFramework="net45" />
9-
<package id="Xamarin.Forms" version="1.4.0.6341" targetFramework="MonoAndroid50" />
109
<package id="xunit" version="2.0.0" targetFramework="net45" />
1110
<package id="xunit.abstractions" version="2.0.0" targetFramework="portable-net45+win+wpa81+wp80+MonoTouch10+MonoAndroid10+xamarinmac20+xamarinios10" />
1211
<package id="xunit.assert" version="2.0.0" targetFramework="net45" />

0 commit comments

Comments
 (0)