diff --git a/FakeDemo/Droid/FakeDemo.Droid.csproj b/FakeDemo/Droid/FakeDemo.Droid.csproj index 876027a..e0eee7e 100644 --- a/FakeDemo/Droid/FakeDemo.Droid.csproj +++ b/FakeDemo/Droid/FakeDemo.Droid.csproj @@ -42,23 +42,23 @@ - - ..\packages\Xamarin.Android.Support.v4.22.2.1.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll - - ..\packages\Xamarin.Forms.1.5.0.6446\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll + ..\packages\Xamarin.Forms.1.5.0.6447\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll - ..\packages\Xamarin.Forms.1.5.0.6446\lib\MonoAndroid10\FormsViewGroup.dll + ..\packages\Xamarin.Forms.1.5.0.6447\lib\MonoAndroid10\FormsViewGroup.dll - ..\packages\Xamarin.Forms.1.5.0.6446\lib\MonoAndroid10\Xamarin.Forms.Core.dll + ..\packages\Xamarin.Forms.1.5.0.6447\lib\MonoAndroid10\Xamarin.Forms.Core.dll - ..\packages\Xamarin.Forms.1.5.0.6446\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll + ..\packages\Xamarin.Forms.1.5.0.6447\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll - ..\packages\Xamarin.Forms.1.5.0.6446\lib\MonoAndroid10\Xamarin.Forms.Platform.dll + ..\packages\Xamarin.Forms.1.5.0.6447\lib\MonoAndroid10\Xamarin.Forms.Platform.dll + + + ..\packages\Xamarin.Android.Support.v4.23.0.1.1\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll @@ -89,5 +89,5 @@ - + \ No newline at end of file diff --git a/FakeDemo/Droid/Resources/Resource.designer.cs b/FakeDemo/Droid/Resources/Resource.designer.cs index c2ec09e..0816145 100644 --- a/FakeDemo/Droid/Resources/Resource.designer.cs +++ b/FakeDemo/Droid/Resources/Resource.designer.cs @@ -26,6 +26,8 @@ static Resource() public static void UpdateIdValues() { + global::Xamarin.Forms.Platform.Resource.String.ApplicationName = global::FakeDemo.Droid.Resource.String.ApplicationName; + global::Xamarin.Forms.Platform.Resource.String.Hello = global::FakeDemo.Droid.Resource.String.Hello; } public partial class Attribute @@ -56,6 +58,25 @@ private Drawable() { } } + + public partial class String + { + + // aapt resource value: 0x7f030001 + public const int ApplicationName = 2130903041; + + // aapt resource value: 0x7f030000 + public const int Hello = 2130903040; + + static String() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + private String() + { + } + } } } #pragma warning restore 1591 diff --git a/FakeDemo/Droid/packages.config b/FakeDemo/Droid/packages.config index a8cf6f0..4299a73 100644 --- a/FakeDemo/Droid/packages.config +++ b/FakeDemo/Droid/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git "a/FakeDemo/FakeDemo.UnitTests\bin\\Debug/nunit.framework.dll" "b/FakeDemo/FakeDemo.UnitTests\bin\\Debug/nunit.framework.dll" new file mode 100644 index 0000000..ed6550b Binary files /dev/null and "b/FakeDemo/FakeDemo.UnitTests\bin\\Debug/nunit.framework.dll" differ diff --git a/FakeDemo/FakeDemo.UnitTests/FakeDemo.UnitTests.csproj b/FakeDemo/FakeDemo.UnitTests/FakeDemo.UnitTests.csproj new file mode 100644 index 0000000..59e31d9 --- /dev/null +++ b/FakeDemo/FakeDemo.UnitTests/FakeDemo.UnitTests.csproj @@ -0,0 +1,43 @@ + + + + Debug + AnyCPU + {48F4ABD7-EFC6-4640-BE36-29ECC13892FA} + Library + FakeDemo.UnitTests + FakeDemo.UnitTests + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + ..\packages\NUnit.2.6.4\lib\nunit.framework.dll + + + + + + + + + + \ No newline at end of file diff --git a/FakeDemo/FakeDemo.UnitTests/Test.cs b/FakeDemo/FakeDemo.UnitTests/Test.cs new file mode 100644 index 0000000..0693872 --- /dev/null +++ b/FakeDemo/FakeDemo.UnitTests/Test.cs @@ -0,0 +1,14 @@ +using NUnit.Framework; + +namespace FakeDemo.UnitTests +{ + [TestFixture] + public class Test + { + [Test] + public void TestCase() + { + Assert.IsTrue(true); + } + } +} diff --git a/FakeDemo/FakeDemo.UnitTests/packages.config b/FakeDemo/FakeDemo.UnitTests/packages.config new file mode 100644 index 0000000..09300da --- /dev/null +++ b/FakeDemo/FakeDemo.UnitTests/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/FakeDemo/FakeDemo.csproj b/FakeDemo/FakeDemo.csproj index 4ebd1aa..dcbea29 100644 --- a/FakeDemo/FakeDemo.csproj +++ b/FakeDemo/FakeDemo.csproj @@ -37,24 +37,24 @@ - + + + + MSBuild:UpdateDesignTimeXaml + + - packages\Xamarin.Forms.1.5.0.6446\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Core.dll + packages\Xamarin.Forms.1.5.0.6447\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Core.dll - packages\Xamarin.Forms.1.5.0.6446\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Xaml.dll + packages\Xamarin.Forms.1.5.0.6447\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Xaml.dll - packages\Xamarin.Forms.1.5.0.6446\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Platform.dll + packages\Xamarin.Forms.1.5.0.6447\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Platform.dll - - - MSBuild:UpdateDesignTimeXaml - - \ No newline at end of file diff --git a/FakeDemo/FakeDemo.sln b/FakeDemo/FakeDemo.sln index e726a95..ac9a451 100644 --- a/FakeDemo/FakeDemo.sln +++ b/FakeDemo/FakeDemo.sln @@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FakeDemo.Droid", "Droid\Fak EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FakeDemo.UITests", "UITests\FakeDemo.UITests.csproj", "{559CFEA0-A995-4A1B-8013-B14DB9B9738F}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FakeDemo.UnitTests", "FakeDemo.UnitTests\FakeDemo.UnitTests.csproj", "{48F4ABD7-EFC6-4640-BE36-29ECC13892FA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,6 +45,18 @@ Global {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E}.Release|iPhone.Build.0 = Release|Any CPU {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {28420794-0CA6-49D2-AFBB-4F62CF2E8C2E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {48F4ABD7-EFC6-4640-BE36-29ECC13892FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48F4ABD7-EFC6-4640-BE36-29ECC13892FA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48F4ABD7-EFC6-4640-BE36-29ECC13892FA}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {48F4ABD7-EFC6-4640-BE36-29ECC13892FA}.Debug|iPhone.Build.0 = Debug|Any CPU + {48F4ABD7-EFC6-4640-BE36-29ECC13892FA}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {48F4ABD7-EFC6-4640-BE36-29ECC13892FA}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {48F4ABD7-EFC6-4640-BE36-29ECC13892FA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48F4ABD7-EFC6-4640-BE36-29ECC13892FA}.Release|Any CPU.Build.0 = Release|Any CPU + {48F4ABD7-EFC6-4640-BE36-29ECC13892FA}.Release|iPhone.ActiveCfg = Release|Any CPU + {48F4ABD7-EFC6-4640-BE36-29ECC13892FA}.Release|iPhone.Build.0 = Release|Any CPU + {48F4ABD7-EFC6-4640-BE36-29ECC13892FA}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {48F4ABD7-EFC6-4640-BE36-29ECC13892FA}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {559CFEA0-A995-4A1B-8013-B14DB9B9738F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {559CFEA0-A995-4A1B-8013-B14DB9B9738F}.Debug|Any CPU.Build.0 = Debug|Any CPU {559CFEA0-A995-4A1B-8013-B14DB9B9738F}.Debug|iPhone.ActiveCfg = Debug|Any CPU diff --git a/FakeDemo/UITests/FakeDemo.UITests.csproj b/FakeDemo/UITests/FakeDemo.UITests.csproj index 759fe5f..3a83495 100644 --- a/FakeDemo/UITests/FakeDemo.UITests.csproj +++ b/FakeDemo/UITests/FakeDemo.UITests.csproj @@ -29,12 +29,12 @@ - - ..\packages\Xamarin.UITest.1.0.0\lib\Xamarin.UITest.dll - ..\packages\NUnit.2.6.4\lib\nunit.framework.dll + + ..\packages\Xamarin.UITest.1.1.1\lib\Xamarin.UITest.dll + diff --git a/FakeDemo/UITests/Tests.cs b/FakeDemo/UITests/Tests.cs index 4358dc3..5fed299 100644 --- a/FakeDemo/UITests/Tests.cs +++ b/FakeDemo/UITests/Tests.cs @@ -28,8 +28,7 @@ public void BeforeEachTest() [Test] public void WelcomeTextIsDisplayed() { - AppResult[] results = app.WaitForElement(c => c.Marked("Welcome to Xamarin Forms!")); - app.Screenshot("Welcome screen."); + AppResult[] results = app.WaitForElement(c => c.Marked("Built using FAKE!")); Assert.IsTrue(results.Any()); } diff --git a/FakeDemo/UITests/packages.config b/FakeDemo/UITests/packages.config index 4962ca5..2d9e3ac 100644 --- a/FakeDemo/UITests/packages.config +++ b/FakeDemo/UITests/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/FakeDemo/build.fsx b/FakeDemo/build.fsx index 42d5f4a..7ea97c4 100644 --- a/FakeDemo/build.fsx +++ b/FakeDemo/build.fsx @@ -3,13 +3,27 @@ open Fake open Fake.XamarinHelper let buildDir = "FakeDemo/bin/Debug" +let testProj = !! "FakeDemo.UnitTests/FakeDemo.UnitTests.csproj" +let testDll = !! "FakeDemo.UnitTests/bin/Debug/FakeDemo.UnitTests.dll" Target "Clean" (fun _ -> CleanDir buildDir ) -Target "Test" (fun _ -> - trace "Testing stuff..." +Target "Build-UnitTests" (fun _ -> + testProj + |> MSBuild "FakeDemo.UnitTests\bin\Debug" "Build" [ ("Configuration", "Debug"); ("Platform", "Any CPU") ] + |> Log "---Unit Test build output----" +) + +Target "Run-UnitTests" (fun _ -> + testDll |> NUnit ( fun defaults -> + { + defaults with ToolPath = "/Library/Frameworks/Mono.framework/Commands/" + ToolName = "nunit-console4" + WorkingDir = "FakeDemo.UnitTests\bin\Debug" + DisableShadowCopy = true + }) ) Target "Build-Pcl" (fun _ -> @@ -25,7 +39,7 @@ Target "Build-iOS" (fun _ -> { defaults with ProjectPath = "iOS/FakeDemo.iOS.csproj" OutputPath = "iOS/iPhoneSimulator/Debug" - Configuration = "Debug|iPhoneSimulator" + Configuration = "Ad-Hoc|iPhone" Target = "Build" }) ) @@ -37,12 +51,13 @@ Target "Build-Droid" (fun _ -> ) "Clean" - ==> "Build-Pcl" - ==> "Test" + ==> "Build-UnitTests" + ==> "Run-UnitTests" "Clean" ==> "Build-Pcl" ==> "Build-iOS" ==> "Build-Droid" + ==> "Run-UnitTests" -RunTargetOrDefault "Test" \ No newline at end of file +RunTargetOrDefault "Run-UnitTests" \ No newline at end of file diff --git a/FakeDemo/iOS/FakeDemo.iOS.csproj b/FakeDemo/iOS/FakeDemo.iOS.csproj index c8f9e04..0a43242 100644 --- a/FakeDemo/iOS/FakeDemo.iOS.csproj +++ b/FakeDemo/iOS/FakeDemo.iOS.csproj @@ -23,6 +23,10 @@ None true true + iPhone Developer + true + + full @@ -59,6 +63,8 @@ true iPhone Developer true + true + FakeDemo @@ -66,19 +72,19 @@ - ..\packages\Xamarin.TestCloud.Agent.0.16.1\lib\Xamarin.iOS10\Calabash.dll + ..\packages\Xamarin.TestCloud.Agent.0.16.2\lib\Xamarin.iOS10\Calabash.dll - ..\packages\Xamarin.Forms.1.5.0.6446\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll + ..\packages\Xamarin.Forms.1.5.0.6447\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll - ..\packages\Xamarin.Forms.1.5.0.6446\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll + ..\packages\Xamarin.Forms.1.5.0.6447\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll - ..\packages\Xamarin.Forms.1.5.0.6446\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll + ..\packages\Xamarin.Forms.1.5.0.6447\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll - ..\packages\Xamarin.Forms.1.5.0.6446\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll + ..\packages\Xamarin.Forms.1.5.0.6447\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll @@ -121,5 +127,5 @@ - + \ No newline at end of file diff --git a/FakeDemo/iOS/packages.config b/FakeDemo/iOS/packages.config index 14e9a6b..37121cf 100644 --- a/FakeDemo/iOS/packages.config +++ b/FakeDemo/iOS/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/FakeDemo/packages.config b/FakeDemo/packages.config index d6824ed..4072e9f 100644 --- a/FakeDemo/packages.config +++ b/FakeDemo/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file