private BuildingTypeDetailsModel[] CreateFullBuildingTypeDetailsModel(bool useEmbedded = false) { var nameFormats = new BuildingTypeDetailsModel.BuildingNameFormatModel[] { new BuildingTypeDetailsModel.BuildingNameFormatModel { NameFormat = "The {people}'s {food}", RandomizationWeight = 1 }, new BuildingTypeDetailsModel.BuildingNameFormatModel { NameFormat = "{food} & {item} Place", RandomizationWeight = 1 }, new BuildingTypeDetailsModel.BuildingNameFormatModel { NameFormat = "{item} OR {food}", RandomizationWeight = 1 }, }; if (useEmbedded) { nameFormats = new BuildingTypeDetailsModel.BuildingNameFormatModel[] { new BuildingTypeDetailsModel.BuildingNameFormatModel { NameFormat = "{embed}", RandomizationWeight = 1 }, }; } var detailsModel = _fixture.Build <BuildingTypeDetailsModel>() .With(x => x.NameFormats, nameFormats) .CreateMany(useEmbedded ? 1 : 3) .ToArray(); return(detailsModel); }
private BuildingTypeDetailsModel[] CreateSingleBuildingTypeDetailsModel() { var nameFormats = new BuildingTypeDetailsModel.BuildingNameFormatModel[] { new BuildingTypeDetailsModel.BuildingNameFormatModel { NameFormat = "{people} & {people}", RandomizationWeight = 1 }, }; var detailsModel = _fixture.Build <BuildingTypeDetailsModel>() .With(x => x.NameFormats, nameFormats) .CreateMany(1) .ToArray(); return(detailsModel); }