summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core.UnitTests
diff options
context:
space:
mode:
authorRui Marinho <me@ruimarinho.net>2017-05-04 15:27:30 +0100
committerRui Marinho <me@ruimarinho.net>2017-05-04 15:31:05 +0100
commit30412cbc3b84a38be2db1959d0ac9eb84e59a6ac (patch)
tree133aa687b343632297e3bcf3955ecd8fdc54ec24 /Xamarin.Forms.Core.UnitTests
parent930c0678ed202ffac9041fa9f2f9149d2ff793ac (diff)
downloadxamarin-forms-30412cbc3b84a38be2db1959d0ac9eb84e59a6ac.tar.gz
xamarin-forms-30412cbc3b84a38be2db1959d0ac9eb84e59a6ac.tar.bz2
xamarin-forms-30412cbc3b84a38be2db1959d0ac9eb84e59a6ac.zip
Fix bugzilla55542 (#898)
* [Controls] Add repo for bugzilla 55542 * [Core] Fix caching null renderer for ViewCell view
Diffstat (limited to 'Xamarin.Forms.Core.UnitTests')
-rw-r--r--Xamarin.Forms.Core.UnitTests/RegistrarUnitTests.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core.UnitTests/RegistrarUnitTests.cs b/Xamarin.Forms.Core.UnitTests/RegistrarUnitTests.cs
index c477f022..c19c125d 100644
--- a/Xamarin.Forms.Core.UnitTests/RegistrarUnitTests.cs
+++ b/Xamarin.Forms.Core.UnitTests/RegistrarUnitTests.cs
@@ -145,5 +145,22 @@ namespace Xamarin.Forms.Core.UnitTests
Assert.AreEqual (typeof (MockRenderer), registrar.GetHandlerType (typeof (View)));
}
+
+ [Test]
+ public void TestGetRendererNullViewRenderer()
+ {
+ var registrar = new Internals.Registrar<MockRenderer>();
+
+ //let's say that we are now registering the view of a viewcell
+ registrar.Register(typeof(View), typeof(MockRenderer));
+ //later we had a view that was registered with null because there's
+ //no default renderer for View
+ registrar.Register(typeof(View), null);
+
+ var renderer = registrar.GetHandler(typeof(View));
+
+ Assert.That(renderer, Is.InstanceOf<MockRenderer>());
+ }
+
}
}