public void It_Should_Serialise_To_This() { const string expectedXML = FullMappingXml; string outputXML = new MappingSetSerialisationScheme().SerialiseReferenceMapping(GetMapping()); outputXML = XmlSqueezer.RemoveWhitespaceBetweenElements(outputXML); Assert.That(outputXML, Is.EqualTo(expectedXML)); }
public void It_Should_Serialise_To_This() { var set = new MappingSetImpl(); set.AddMapping(When_Serialising_A_Mapping_With_All_Fields_Set.GetMapping()); set.AddMapping(When_Serialising_A_ReferenceMapping_With_All_Fields_Set.GetMapping()); string outputXML = new MappingSetSerialisationScheme().SerialiseMappingSet(set); outputXML = XmlSqueezer.RemoveWhitespaceBetweenElements(outputXML); Assert.That(outputXML, Is.EqualTo(FullMappingSetXml)); }
public override void Save(string folder) { string xmlHeader = "<?xml version=\"1.0\" ?>" + Environment.NewLine; if (editModelScreen != null) { editModelScreen.Save(); } string xml = new DatabaseSerialisationScheme().Serialise(MappingSet.Database); File.WriteAllText(Path.Combine(folder, DatabaseFilename), xmlHeader + xml); xml = new EntitySetSerialisationScheme().SerialiseEntitySet(MappingSet.EntitySet); File.WriteAllText(Path.Combine(folder, EntitiesFilename), xmlHeader + xml); xml = new MappingSetSerialisationScheme().SerialiseMappingSet(MappingSet); File.WriteAllText(Path.Combine(folder, MappingsFilename), xmlHeader + xml); }
public override void Save(string folder) { string xmlHeader = "<?xml version=\"1.0\" ?>" + Environment.NewLine; if (editModelScreen != null) editModelScreen.Save(); string xml = new DatabaseSerialisationScheme().Serialise(MappingSet.Database); File.WriteAllText(Path.Combine(folder, DatabaseFilename), xmlHeader + xml); xml = new EntitySetSerialisationScheme().SerialiseEntitySet(MappingSet.EntitySet); File.WriteAllText(Path.Combine(folder, EntitiesFilename), xmlHeader + xml); xml = new MappingSetSerialisationScheme().SerialiseMappingSet(MappingSet); File.WriteAllText(Path.Combine(folder, MappingsFilename), xmlHeader + xml); }
public void It_Should_Serialise_To_This() { string outputXML = new MappingSetSerialisationScheme().SerialiseMappingSet(new MappingSetImpl()); outputXML = XmlSqueezer.RemoveWhitespaceBetweenElements(outputXML); Assert.That(outputXML, Is.EqualTo(EmptyMappingSetXml)); }