Browse Source

New Unit Tests. "ListBox2" does not work at the moment!

pull/586/head
jogibear9988 12 years ago
parent
commit
f72e6b8806
  1. 136
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Tests/XamlDom/SamplesTests.cs

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

@ -127,7 +127,7 @@ namespace ICSharpCode.WpfDesign.Tests.XamlDom
} }
[Test] [Test]
public void Resources() public void Resources1()
{ {
TestLoading(@"<Page Name=""root"" TestLoading(@"<Page Name=""root""
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
@ -141,19 +141,19 @@ namespace ICSharpCode.WpfDesign.Tests.XamlDom
</Page>"); </Page>");
} }
[Test] [Test]
public void Resources2() public void Resources2()
{ {
TestLoading(@"<UserControl TestLoading(@"<UserControl
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""> xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<UserControl.Resources> <UserControl.Resources>
<ResourceDictionary /> <ResourceDictionary />
</UserControl.Resources> </UserControl.Resources>
</UserControl>"); </UserControl>");
} }
[Test] [Test]
public void Resources3() public void Resources3()
{ {
TestLoading(@"<UserControl TestLoading(@"<UserControl
@ -165,10 +165,10 @@ namespace ICSharpCode.WpfDesign.Tests.XamlDom
</UserControl>"); </UserControl>");
} }
[Test] [Test]
public void Resources4() public void Resources4()
{ {
TestLoading(@"<UserControl TestLoading(@"<UserControl
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""> xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<UserControl.Resources> <UserControl.Resources>
@ -177,8 +177,25 @@ namespace ICSharpCode.WpfDesign.Tests.XamlDom
</ResourceDictionary> </ResourceDictionary>
</UserControl.Resources> </UserControl.Resources>
</UserControl>"); </UserControl>");
} }
[Test]
public void Resources5()
{
TestLoading(@"<UserControl
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source=""/ICSharpCode.WpfDesign.Tests;component/Test.xaml"" />
</ResourceDictionary.MergedDictionaries >
</ResourceDictionary>
</UserControl.Resources>
</UserControl>");
}
[Test] [Test]
public void Animation1() public void Animation1()
{ {
@ -234,7 +251,7 @@ namespace ICSharpCode.WpfDesign.Tests.XamlDom
[Test] [Test]
public void Animation3() public void Animation3()
{ {
TestLoading(@"<Window TestLoading(@"<Window
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""> xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<Canvas> <Canvas>
@ -258,10 +275,10 @@ namespace ICSharpCode.WpfDesign.Tests.XamlDom
</Window>"); </Window>");
} }
[Test] [Test]
public void ContentControl1() public void ContentControl1()
{ {
TestLoading(@"<Window TestLoading(@"<Window
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""> xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<Canvas> <Canvas>
@ -270,12 +287,12 @@ namespace ICSharpCode.WpfDesign.Tests.XamlDom
</ContentControl> </ContentControl>
</Canvas> </Canvas>
</Window>"); </Window>");
} }
[Test] [Test]
public void ContentControl2() public void ContentControl2()
{ {
TestLoading(@"<Window TestLoading(@"<Window
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""> xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<Canvas> <Canvas>
@ -286,24 +303,24 @@ namespace ICSharpCode.WpfDesign.Tests.XamlDom
</ContentControl> </ContentControl>
</Canvas> </Canvas>
</Window>"); </Window>");
} }
[Test] [Test]
public void Children1() public void Children1()
{ {
TestLoading(@"<Window TestLoading(@"<Window
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""> xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<Canvas> <Canvas>
<Button /> <Button />
</Canvas> </Canvas>
</Window>"); </Window>");
} }
[Test] [Test]
public void Children2() public void Children2()
{ {
TestLoading(@"<Window TestLoading(@"<Window
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""> xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<Canvas> <Canvas>
@ -312,12 +329,12 @@ namespace ICSharpCode.WpfDesign.Tests.XamlDom
</Canvas.Children> </Canvas.Children>
</Canvas> </Canvas>
</Window>"); </Window>");
} }
[Test] [Test]
public void Children3() public void Children3()
{ {
TestLoading(@"<Window TestLoading(@"<Window
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""> xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<Canvas> <Canvas>
@ -326,12 +343,12 @@ namespace ICSharpCode.WpfDesign.Tests.XamlDom
</Canvas.Children> </Canvas.Children>
</Canvas> </Canvas>
</Window>"); </Window>");
} }
[Test] [Test]
public void ListBox1() public void ListBox1()
{ {
TestLoading(@"<Window TestLoading(@"<Window
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""> xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<Canvas> <Canvas>
@ -341,13 +358,32 @@ bb
</ListBox> </ListBox>
</Canvas> </Canvas>
</Window>"); </Window>");
} }
[Test]
public void ListBox2()
{
TestLoading(@"<Window
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<Canvas>
<ListBox ScrollViewer.VerticalScrollBarVisibility=""Hidden"">
<ListBox.ItemContainerStyle>
<Style TargetType=""{x:Type ListBoxItem}"">
<Setter Property=""Width"" Value=""10"" />
</Style>
</ListBox.ItemContainerStyle>
aa
bb
</ListBox>
</Canvas>
</Window>");
}
[Test] [Test]
public void CData1() public void CData1()
{ {
TestLoading(@"<Window TestLoading(@"<Window
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""> xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<Canvas> <Canvas>
@ -364,6 +400,6 @@ bb
</x:Code> </x:Code>
</Canvas> </Canvas>
</Window>"); </Window>");
} }
} }
} }

Loading…
Cancel
Save