Merge pull request #704 from jgagnon/master
[mono.git] / mcs / class / System.Xaml / Test / System.Xaml / XamlXmlReaderTest.cs
index ecb622413d330952b110f2fdac2d754405677a12..70b26b87c5ab2dd6d95b4089e92b3016183f0656 100755 (executable)
@@ -45,7 +45,9 @@ namespace MonoTests.System.Xaml
 
                XamlReader GetReader (string filename)
                {
-                       return new XamlXmlReader (XmlReader.Create (Path.Combine ("Test/XmlFiles", filename), new XmlReaderSettings () { CloseInput =true }));
+                       const string ver = "net_4_x";
+                       string xml = File.ReadAllText (Path.Combine ("Test/XmlFiles", filename)).Replace ("net_4_0", ver);
+                       return new XamlXmlReader (XmlReader.Create (new StringReader (xml)));
                }
 
                void ReadTest (string filename)
@@ -664,6 +666,58 @@ namespace MonoTests.System.Xaml
                        Read_CollectionContentPropertyX (r, true);
                }
 
+               [Test]
+               public void Read_AmbientPropertyContainer ()
+               {
+                       var r = GetReader ("AmbientPropertyContainer.xml");
+                       Read_AmbientPropertyContainer (r, false);
+               }
+
+               [Test]
+               public void Read_AmbientPropertyContainer2 ()
+               {
+                       var r = GetReader ("AmbientPropertyContainer2.xml");
+                       Read_AmbientPropertyContainer (r, true);
+               }
+
+               [Test]
+               public void Read_NullableContainer ()
+               {
+                       var r = GetReader ("NullableContainer.xml");
+                       Read_NullableContainer (r);
+               }
+
+               // It is not really a common test; it just makes use of base helper methods.
+               [Test]
+               public void Read_DirectListContainer ()
+               {
+                       var r = GetReader ("DirectListContainer.xml");
+                       Read_DirectListContainer (r);
+               }
+
+               // It is not really a common test; it just makes use of base helper methods.
+               [Test]
+               public void Read_DirectDictionaryContainer ()
+               {
+                       var r = GetReader ("DirectDictionaryContainer.xml");
+                       Read_DirectDictionaryContainer (r);
+               }
+
+               // It is not really a common test; it just makes use of base helper methods.
+               [Test]
+               public void Read_DirectDictionaryContainer2 ()
+               {
+                       var r = GetReader ("DirectDictionaryContainer2.xml");
+                       Read_DirectDictionaryContainer2 (r);
+               }
+               
+               [Test]
+               public void Read_ContentPropertyContainer ()
+               {
+                       var r = GetReader ("ContentPropertyContainer.xml");
+                       Read_ContentPropertyContainer (r);
+               }
+
                #region non-common tests
                [Test]
                public void Bug680385 ()