summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Xaml.UnitTests
diff options
context:
space:
mode:
authorStephane Delcroix <stephane@delcroix.org>2017-03-15 11:35:44 +0100
committerGitHub <noreply@github.com>2017-03-15 11:35:44 +0100
commitc9589b6065791e79ae30c46589e706b4086cc7fb (patch)
tree7db5e328b373dcb4b97ed149e7c026cbe94832f0 /Xamarin.Forms.Xaml.UnitTests
parent295cba6e488da46367149f1687a54f4230019202 (diff)
downloadxamarin-forms-c9589b6065791e79ae30c46589e706b4086cc7fb.tar.gz
xamarin-forms-c9589b6065791e79ae30c46589e706b4086cc7fb.tar.bz2
xamarin-forms-c9589b6065791e79ae30c46589e706b4086cc7fb.zip
[test] passing test for 53318 (#818)
Diffstat (limited to 'Xamarin.Forms.Xaml.UnitTests')
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/Issues/Bz53318.xaml17
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/Issues/Bz53318.xaml.cs44
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj6
3 files changed, 67 insertions, 0 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Bz53318.xaml b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz53318.xaml
new file mode 100644
index 00000000..51e2b77a
--- /dev/null
+++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz53318.xaml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ xmlns:local="clr-namespace:Xamarin.Forms.Xaml.UnitTests"
+ x:Class="Xamarin.Forms.Xaml.UnitTests.Bz53318">
+ <ListView>
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <local:Bz53318ListView>
+ <x:Arguments>
+ <ListViewCachingStrategy>RecycleElement</ListViewCachingStrategy>
+ </x:Arguments>
+ </local:Bz53318ListView>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+</ContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Bz53318.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz53318.xaml.cs
new file mode 100644
index 00000000..e04eee10
--- /dev/null
+++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz53318.xaml.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using NUnit.Framework;
+using Xamarin.Forms;
+using Xamarin.Forms.Core.UnitTests;
+using Xamarin.Forms.Xaml;
+
+namespace Xamarin.Forms.Xaml.UnitTests
+{
+ public class Bz53318ListView : ListView
+ {
+ }
+
+ [XamlCompilation(XamlCompilationOptions.Skip)]
+ public partial class Bz53318 : ContentPage
+ {
+ public Bz53318()
+ {
+ InitializeComponent();
+ }
+
+ [TestFixture]
+ public class Tests
+ {
+ [SetUp]
+ public void Setup()
+ {
+ Device.PlatformServices = new MockPlatformServices();
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ Device.PlatformServices = null;
+ }
+
+ [Test]
+ public void DoesCompilesArgsInsideDataTemplate()
+ {
+ Assert.DoesNotThrow(()=>MockCompiler.Compile(typeof(Bz53318)));
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj b/Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj
index 0f0f2c59..8cdd821d 100644
--- a/Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj
+++ b/Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj
@@ -449,6 +449,9 @@
<Compile Include="Issues\Unreported009.xaml.cs">
<DependentUpon>Unreported009.xaml</DependentUpon>
</Compile>
+ <Compile Include="Issues\Bz53318.xaml.cs">
+ <DependentUpon>Bz53318.xaml</DependentUpon>
+ </Compile>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="..\.nuspec\Xamarin.Forms.Debug.targets" />
@@ -818,6 +821,9 @@
<EmbeddedResource Include="Issues\Unreported009.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
+ <EmbeddedResource Include="Issues\Bz53318.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />