/// <summary>
        /// Compares the serialized content of the settings structure against an Xml embedded resource string.
        /// </summary>
        /// <param name="settings">The settings structure whose serialization is to be compared</param>
        /// <param name="resource">The path to an embedded resource which contains the serialized Xml content to compare against</param>
        private void Compare(BoostTestAdapterSettings settings, string resource)
        {
            XmlElement element = settings.ToXml();

            using (Stream stream = TestHelper.LoadEmbeddedResource(resource))
            {
                XmlDocument doc = new XmlDocument();
                doc.Load(stream);

                XmlNode root = doc.DocumentElement.SelectSingleNode("/RunSettings/BoostTest");

                XmlComparer comparer = new XmlComparer();
                comparer.CompareXML(element, root, XmlNodeTypeFilter.DefaultFilter);
            }
        }
        public void SerializeTestFramework()
        {
            string sourceFile = "test_runner_test.cpp";

            TestFramework framework = new TestFrameworkBuilder(Source, "Test runner test", 1).
                TestCase("test1", 65536, new SourceFileInfo(sourceFile, 26)).
                TestCase("test2", 65537, new SourceFileInfo(sourceFile, 35)).
                TestSuite("SampleSuite", 2).
                    TestSuite("SampleNestedSuite", 3).
                        TestCase("test3", 65538, new SourceFileInfo(sourceFile, 48)).
                    EndSuite().
                EndSuite().
                TestSuite("TemplateSuite", 4).
                    TestCase("my_test<char>", 65539, new SourceFileInfo(sourceFile, 79)).
                    TestCase("my_test<int>", 65540, new SourceFileInfo(sourceFile, 79)).
                    TestCase("my_test<float>", 65541, new SourceFileInfo(sourceFile, 79)).
                    TestCase("my_test<double>", 65542, new SourceFileInfo(sourceFile, 79)).
                EndSuite().
                Build();

            using (Stream stream = TestHelper.LoadEmbeddedResource("BoostTestAdapterNunit.Resources.TestLists.sample.test.list.xml"))
            {
                XmlDocument baseXml = new XmlDocument();
                baseXml.Load(stream);

                XmlComparer comparer = new XmlComparer();
                comparer.CompareXML(baseXml, Serialize(framework), XmlNodeTypeFilter.DefaultFilter);
            }
        }