blob: b35339d53a26eb0f7a2f4225896f9227c2032159 (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
using System;
using NUnit.Framework;
using Xamarin.Forms.Core.UnitTests;
namespace Xamarin.Forms.Xaml.UnitTests
{
[TestFixture]
public class Issue1497
{
[SetUp]
public void Setup()
{
Device.PlatformServices = new MockPlatformServices();
}
[TearDown]
public void TearDown()
{
Device.PlatformServices = null;
}
[Test]
public void BPCollectionsWithSingleElement ()
{
var xaml = @"<?xml version=""1.0"" encoding=""utf-8"" ?>
<Grid
xmlns=""http://xamarin.com/schemas/2014/forms""
xmlns:x=""http://schemas.microsoft.com/winfx/2009/xaml"">
<Grid.ColumnDefinitions>
<ColumnDefinition Width=""*""/>
</Grid.ColumnDefinitions>
</Grid>";
var grid = new Grid ().LoadFromXaml (xaml);
Assert.AreEqual (1, grid.ColumnDefinitions.Count);
Assert.True (grid.ColumnDefinitions [0].Width.IsStar);
}
}
}
|