This repository has been archived by the owner on Mar 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
adamped
committed
Aug 8, 2015
1 parent
2bbbec5
commit 0988851
Showing
24 changed files
with
436 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using Refractored.Xam.Settings; | ||
using Refractored.Xam.Settings.Abstractions; | ||
|
||
namespace Common.Helpers | ||
{ | ||
/// <summary> | ||
/// This is the Settings static class that can be used in your Core solution or in any | ||
/// of your client applications. All settings are laid out the same exact way with getters | ||
/// and setters. | ||
/// </summary> | ||
public static class Settings | ||
{ | ||
private static ISettings AppSettings | ||
{ | ||
get | ||
{ | ||
return CrossSettings.Current; | ||
} | ||
} | ||
|
||
#region Setting Constants | ||
|
||
private const string SettingsKey = "settings_key"; | ||
private static readonly string SettingsDefault = string.Empty; | ||
|
||
#endregion | ||
|
||
public static string GeneralSettings | ||
{ | ||
get | ||
{ | ||
return AppSettings.GetValueOrDefault(SettingsKey, SettingsDefault); | ||
} | ||
set | ||
{ | ||
AppSettings.AddOrUpdateValue(SettingsKey, value); | ||
} | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Xam.Plugins.Settings" version="1.5.2" targetFramework="portable-net45+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10" /> | ||
<package id="Xamarin.Forms" version="1.3.3.6323" targetFramework="portable-net45+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.IO; | ||
using System.Linq; | ||
using Xamarin.UITest; | ||
using Xamarin.UITest.Queries; | ||
|
||
namespace Mobile.UITest | ||
{ | ||
public class AppInitializer | ||
{ | ||
public static IApp StartApp(Platform platform) | ||
{ | ||
if (platform == Platform.Android) | ||
{ | ||
return ConfigureApp | ||
.Android | ||
.StartApp(); | ||
} | ||
|
||
return ConfigureApp | ||
.iOS | ||
.StartApp(); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?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> | ||
<ProjectGuid>{584F4F30-0140-4296-ACD7-03F0DA91682E}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<RootNamespace>Mobile.UITest</RootNamespace> | ||
<AssemblyName>Mobile.UITest</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
</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> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>full</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release</OutputPath> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<ConsolePause>false</ConsolePause> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="nunit.core, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\NUnitTestAdapter.1.2\lib\nunit.core.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="nunit.core.interfaces, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\NUnitTestAdapter.1.2\lib\nunit.core.interfaces.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="nunit.util, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\NUnitTestAdapter.1.2\lib\nunit.util.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="NUnit.VisualStudio.TestAdapter, Version=1.2.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\NUnitTestAdapter.1.2\lib\NUnit.VisualStudio.TestAdapter.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="Xamarin.UITest, Version=0.7.2.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Xamarin.UITest.0.7.2\lib\Xamarin.UITest.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Tests.cs" /> | ||
<Compile Include="AppInitializer.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using System.IO; | ||
using System.Linq; | ||
using NUnit.Framework; | ||
using Xamarin.UITest; | ||
using Xamarin.UITest.Queries; | ||
|
||
namespace Mobile.UITest | ||
{ | ||
[TestFixture(Platform.Android)] | ||
[TestFixture(Platform.iOS)] | ||
public class Tests | ||
{ | ||
IApp app; | ||
Platform platform; | ||
|
||
public Tests(Platform platform) | ||
{ | ||
this.platform = platform; | ||
} | ||
|
||
[SetUp] | ||
public void BeforeEachTest() | ||
{ | ||
app = AppInitializer.StartApp(platform); | ||
} | ||
|
||
[Test] | ||
public void AppLaunches() | ||
{ | ||
app.Screenshot("First screen."); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="NUnit" version="2.6.4" targetFramework="net45" /> | ||
<package id="NUnitTestAdapter" version="1.2" targetFramework="net45" /> | ||
<package id="Xamarin.UITest" version="0.7.2" targetFramework="net45" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.