Ejemplo n.º 1
0
        public void XmlRoundTripTest_v1_2(string filename)
        {
            var resourceFilename = Path.Join("Resources", filename + "-1.2.xml");
            var xmlBom           = File.ReadAllText(resourceFilename);

            var bom = XmlBomDeserializer.Deserialize_v1_2(xmlBom);

            xmlBom = XmlBomSerializer.Serialize(bom);

            Snapshot.Match(xmlBom, SnapshotNameExtension.Create(filename));
        }
Ejemplo n.º 2
0
        public void BomConversionTest_v1_2_to_v1_1_Test(string filename)
        {
            var resourceFilename = Path.Join("Resources", "v1.2", filename + "-1.2.xml");
            var xmlBom           = File.ReadAllText(resourceFilename);

            var bom       = XmlBomDeserializer.Deserialize_v1_2(xmlBom);
            var actualBom = new Models.v1_1.Bom(bom);

            xmlBom = XmlBomSerializer.Serialize(actualBom);

            Snapshot.Match(xmlBom, SnapshotNameExtension.Create(filename));
        }
Ejemplo n.º 3
0
        public void SerializationTests(string filename)
        {
            using (var tempDirectory = new TempDirectory())
            {
                var resourceFilename = Path.Join("Resources", filename + "-1.2.xml");
                var inputBomString   = File.ReadAllText(resourceFilename);
                var bom = XmlBomDeserializer.Deserialize_v1_2(inputBomString);

                var bomCsv = CsvSerializer.Serialize(bom);

                Snapshot.Match(bomCsv, SnapshotNameExtension.Create(filename));
            }
        }