Browse Source

more unit tests

pull/584/head
jogibear9988 11 years ago
parent
commit
669f892c14
  1. 77
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Tests/XamlDom/SamplesTests.cs

77
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Tests/XamlDom/SamplesTests.cs

@ -244,7 +244,82 @@ namespace ICSharpCode.WpfDesign.Tests.XamlDom
</Window>"); </Window>");
} }
[Test]
public void Children1()
{
TestLoading(@"<Window
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<Canvas>
<Button />
</Canvas>
</Window>");
}
[Test]
public void Children2()
{
TestLoading(@"<Window
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<Canvas>
<Canvas.Children>
<Button />
</Canvas.Children>
</Canvas>
</Window>");
}
[Test]
public void Children3()
{
TestLoading(@"<Window
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<Canvas>
<Canvas.Children>
<Button />
</Canvas.Children>
</Canvas>
</Window>");
}
[Test]
public void ListBox1()
{
TestLoading(@"<Window
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<Canvas>
<ListBox>
aa
bb
</ListBox>
</Canvas>
</Window>");
}
[Test]
public void CData1()
{
TestLoading(@"<Window
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<Canvas>
<Button>Press</Button>
<x:Code>
<![CDATA[
} public void ButtonOnClick(object sender, RoutedEventArgs args)
{
Button btn = sender as Button;
MessageBox.Show(""Button clicked"", ""Hello"");
}
]]>
</x:Code>
</Canvas>
</Window>");
}
}
} }

Loading…
Cancel
Save