internal static void AddProperties(int count, string postcode = null, string address = null) { var newProperties = StubPropertyApiResponse().Generate(count); if (postcode != null) { newProperties.ForEach(property => property.PostCode = postcode); } if (address != null) { newProperties.ForEach(property => property.Address1 = address); } MockPropertyApiResponses.AddRange(newProperties); }