blob: 5125ce7400a24fa8ae1d4e1c7835936bb9c78065 (
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 Xamarin.Forms;
using NUnit.Framework;
using System;
using Xamarin.Forms.Core.UnitTests;
namespace Xamarin.Forms.Xaml.UnitTests
{
public partial class TypeConverterTests : ContentPage
{
public TypeConverterTests ()
{
InitializeComponent ();
}
public TypeConverterTests (bool useCompiledXaml)
{
//this stub will be replaced at compile time
}
[TestFixture]
public class Tests
{
[SetUp]
public void Setup ()
{
Device.PlatformServices = new MockPlatformServices ();
}
[TestCase (false)]
[TestCase (true)]
public void UriAreConverted (bool useCompiledXaml)
{
var layout = new TypeConverterTests (useCompiledXaml);
Assert.That (layout.imageSource.Uri, Is.TypeOf<Uri> ());
Assert.AreEqual ("https://xamarin.com/content/images/pages/branding/assets/xamagon.png", layout.imageSource.Uri.ToString ());
}
}
}
}
|