aboutsummaryrefslogtreecommitdiffstatsci
path: root/unitTests/Program.cs
blob: 0211c5a241d3d4b60518fef8d7dea1a6eedb9c8c (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
40
41
42
43
using System;
using Crow;
using Crow.IML;
using NUnit.Framework;

namespace unitTests
{
	[TestFixture]
	public class Instantiator
	{

		[Test]
		public void Widget ()
		{
			Assert.DoesNotThrow (()
				=> Crow.IML.Instantiator.CreateFromImlFragment (null, @"<Widget/>")
				, "test itor failed");
		}
		[Test]
		public void Label ()
		{
			Assert.DoesNotThrow (()
				=> Crow.IML.Instantiator.CreateFromImlFragment (null, @"<Label Text='this is a test'/>")
				, "test itor failed");
		}
		[Test]
		public void TemplatedControl ()
		{
			Assert.DoesNotThrow (()
				=> Crow.IML.Instantiator.CreateFromImlFragment (null, @"<CheckBox IsChecked='false'/>")
				, "test itor failed");
		}

		[Test]
		public void SimpleBinding ()
		{
			Assert.DoesNotThrow (()
				=> Crow.IML.Instantiator.CreateFromImlFragment (null, @"<Widget Background='Blue' Tag='{test}'/>")
				, "test itor failed");
		}

	}
}