NestedCompositeElementMapping INestedCompositeElementMappingProvider.GetCompositeElementMapping()
        {
            var mapping = new NestedCompositeElementMapping(attributes.Clone());

            mapping.Set(x => x.Name, Layer.Defaults, member.Name);

            PopulateMapping(mapping);

            return(mapping);
        }
        public void ShouldWriteNestedCompositeElementName()
        {
            var mapping = new CompositeElementMapping();
            var nestedCompositeElementMapping = new NestedCompositeElementMapping();

            nestedCompositeElementMapping.Set(x => x.Name, Layer.Defaults, "testName");
            mapping.AddCompositeElement(nestedCompositeElementMapping);

            writer.VerifyXml(mapping)
            .Element("nested-composite-element")
            .HasAttribute("name", "testName");
        }