protected override object GenerateValue(Type type, string referenceName, LinkedList<object> buildChain)
{
var multipleMatch = _multipleAddressExpression.Match(referenceName);
if (multipleMatch.Success)
{
// Get the number from the match
var number = int.Parse(multipleMatch.Groups["Number"].Value, CultureInfo.InvariantCulture);
if (number == 1)
{
var floor = Generator.NextValue(1, 15);
var unitIndex = Generator.NextValue(0, 15);
var unit = (char) (65 + unitIndex);
// Return a Unit Xy, Floor X style value
return "Unit " + floor + unit + ", Floor " + floor;
}
if (number > 2)
{
return null;
}
}
var person = TestData.NextPerson();
return person.Address;
}