protected override void Arrange()
            {
                _resources = ResourceModelProvider.GetResourceModel().GetAllResources().ToList();
                _expectedPropertyNamesByDefinitionName = ExpectedPropertyNamesByDefinitionName(_resources);
                _namingStrategy = new SwaggerDefinitionsFactoryDefaultNamingStrategy();

                _expectedDefinitionNames = _resources
                                           .Select(x => _namingStrategy.GetResourceName(x, new SwaggerResource(x)).ToCamelCase()).ToList();
            }
        private static IDictionary <string, List <string> > ExpectedPropertyNamesByDefinitionName(IEnumerable <Resource> resources)
        {
            var namingStrategy = new SwaggerDefinitionsFactoryDefaultNamingStrategy();

            var definitions = resources.Select(
                d => new
            {
                DefinitionName = namingStrategy.GetResourceName(d, new SwaggerResource(d)),
                Properties     = d.UnifiedKeyAllProperties().Select(p => p.JsonPropertyName).Concat(
                    d.Collections.Select(
                        c => c.IsDerivedEntityATypeEntity() && c.IsInherited
                                    ? c.Association.OtherEntity.PluralName.ToCamelCase()
                                    : c.JsonPropertyName)).Concat(d.EmbeddedObjects.Select(e => e.JsonPropertyName))
                                 .Concat(d.References.Select(r => r.PropertyName.ToCamelCase()))
            }).Concat(
                resources.SelectMany(r => r.AllContainedItemTypes).Select(
                    i => new
            {
                DefinitionName = namingStrategy.GetContainedItemTypeName(
                    new SwaggerResource(new Resource("TestResource")), i).ToCamelCase(),
                Properties = i.Properties
                             .Select(p => UniqueIdSpecification.GetUniqueIdPropertyName(p.JsonPropertyName))
                             .Concat(i.Collections.Select(c => c.JsonPropertyName))
                             .Concat(i.EmbeddedObjects.Select(e => e.JsonPropertyName))
                             .Concat(i.References.Select(r => r.PropertyName.ToCamelCase()))
            })).Concat(
                resources.SelectMany(x => x.AllContainedReferences).Distinct(ModelComparers.ReferenceTypeNameOnly).Select(
                    reference => new
            {
                DefinitionName = namingStrategy.GetReferenceName(new Resource("TestResource"), reference),
                Properties     = reference.ReferenceTypeProperties.Where(p => p.IsIdentifying).Select(
                    p => UniqueIdSpecification.GetUniqueIdPropertyName(p.JsonPropertyName))
            })).ToList();

            return(definitions.GroupBy(x => x.DefinitionName).Select(x => x.First()).ToDictionary(
                       k => k.DefinitionName.ToCamelCase(), v => v.Properties.ToList()));
        }