blob: 8fb1759a424b0af50b99e3ee8fef19a788f9b56f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
using System;
using NUnit.Framework;
namespace Xamarin.Forms.Xaml.UnitTests
{
[TestFixture]
public class Issue1637
{
[Test]
public void ImplicitCollectionWithSingleElement ()
{
var xaml = @"
<Grid xmlns=""http://xamarin.com/schemas/2014/forms"">
<Grid.RowDefinitions>
<RowDefinition Height=""*"" />
</Grid.RowDefinitions>
</Grid>";
var grid = new Grid ();
Assert.DoesNotThrow(()=> grid.LoadFromXaml<Grid> (xaml));
Assert.AreEqual (1, grid.RowDefinitions.Count);
Assert.IsTrue (grid.RowDefinitions [0].Height.IsStar);
}
}
}
|