Browse Source

Added test that loads xaml with an explicit list. The official XamlReader can read it successfully but the own XamlParser fails and should be fixed.

pull/77/head
gumme 12 years ago
parent
commit
4d288202a3
  1. 17
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Tests/XamlDom/ExampleClassContainer.cs
  2. 18
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Tests/XamlDom/SimpleLoadTests.cs

17
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Tests/XamlDom/ExampleClassContainer.cs

@ -7,6 +7,10 @@ using System.Windows.Markup; @@ -7,6 +7,10 @@ using System.Windows.Markup;
namespace ICSharpCode.WpfDesign.Tests.XamlDom
{
public class ExampleClassList : List<ExampleClass>
{
}
[ContentProperty("List")]
public class ExampleClassContainer : ExampleClass
{
@ -18,5 +22,18 @@ namespace ICSharpCode.WpfDesign.Tests.XamlDom @@ -18,5 +22,18 @@ namespace ICSharpCode.WpfDesign.Tests.XamlDom
return list;
}
}
ExampleClassList otherList = new ExampleClassList();
public ExampleClassList OtherList {
get {
TestHelperLog.Log("OtherList.get " + Identity);
return otherList;
}
set {
TestHelperLog.Log("OtherList.set " + Identity);
otherList = value;
}
}
}
}

18
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Tests/XamlDom/SimpleLoadTests.cs

@ -190,6 +190,24 @@ namespace ICSharpCode.WpfDesign.Tests.XamlDom @@ -190,6 +190,24 @@ namespace ICSharpCode.WpfDesign.Tests.XamlDom
");
}
[Test]
public void ContainerExplicitList()
{
TestLoading(@"
<ExampleClassContainer
xmlns=""" + XamlTypeFinderTests.XamlDomTestsNamespace + @"""
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
<ExampleClassContainer.OtherList>
<ExampleClassList>
<ExampleClass OtherProp=""a""> </ExampleClass>
<ExampleClass OtherProp=""b"" />
<ExampleClass OtherProp=""c"" />
</ExampleClassList>
</ExampleClassContainer.OtherList>
</ExampleClassContainer>
");
}
[Test]
public void ExampleServiceTest()
{

Loading…
Cancel
Save