public void Deserialize_SampleFile_ConnectionStringLoaded() { int testNr = 0; // Create an instance of the XmlSerializer specifying type and namespace. TestSuiteXml ts = DeserializeSample(); // Check the properties of the object. Assert.That(ts.Tests[testNr].Systems[0], Is.TypeOf <StructureXml>()); Assert.That(((StructureXml)ts.Tests[testNr].Systems[0]).Item, Is.TypeOf <HierarchiesXml>()); HierarchiesXml item = (HierarchiesXml)((StructureXml)ts.Tests[testNr].Systems[0]).Item; Assert.That(item.ConnectionString, Is.EqualTo("connStr")); }
public void Deserialize_SampleFile_MeasureWithDisplayFolderRoot() { int testNr = 3; // Create an instance of the XmlSerializer specifying type and namespace. TestSuiteXml ts = DeserializeSample(); // Check the properties of the object. Assert.That(ts.Tests[testNr].Systems[0], Is.TypeOf <StructureXml>()); Assert.That(((StructureXml)ts.Tests[testNr].Systems[0]).Item, Is.TypeOf <HierarchiesXml>()); HierarchiesXml item = (HierarchiesXml)((StructureXml)ts.Tests[testNr].Systems[0]).Item; Assert.That(item.DisplayFolder, Is.Empty); Assert.That(item.Specification.IsDisplayFolderSpecified, Is.True); }