blob: 794e7ce195db8cda74833e96320f7384ec6cb162 (
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
|
using System;
using System.Collections.Generic;
using Xamarin.Forms;
using NUnit.Framework;
namespace Xamarin.Forms.Xaml.UnitTests
{
public partial class Bz28545 : ContentPage
{
public Bz28545 ()
{
InitializeComponent ();
}
public Bz28545 (bool useCompiledXaml)
{
//this stub will be replaced at compile time
}
[TestFixture]
class Tests
{
[TestCase(true)]
[TestCase(false)]
public void TypeConverterAreAppliedForSettersToAttachedBP (bool useCompiledXaml)
{
var layout = new Bz28545 (useCompiledXaml);
Assert.AreEqual (Color.Pink, layout.label.TextColor);
Assert.AreEqual (AbsoluteLayoutFlags.PositionProportional, AbsoluteLayout.GetLayoutFlags (layout.label));
Assert.AreEqual (new Rectangle (1, 1, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize), AbsoluteLayout.GetLayoutBounds (layout.label));
}
}
}
}
|