scaffolding generator bug - False vs. false

1 view
Skip to first unread message

fmorriso

unread,
Mar 13, 2009, 3:40:42 PM3/13/09
to S#arp Architecture
Given the following inside ScaffoldingGeneratorCommand.tt,

entityScaffoldingDetails.EntityProperties.Add(
new EntityProperty("Description", "string", string.Empty, "[NotNull,
NotEmpty]", false)
);
entityScaffoldingDetails.EntityProperties.Add(
new EntityProperty("BodyCode", "string", string.Empty, "[NotNull,
NotEmpty]", false)
);
entityScaffoldingDetails.EntityProperties.Add(
new EntityProperty("OrderCode", "string", string.Empty, "[NotNull,
NotEmpty]", false)
);
entityScaffoldingDetails.EntityProperties.Add(
new EntityProperty("IsHybrid", "bool", false, "[NotNull]", false)
);

///////////////////////////////////////////////////

// The first parameter should reflect the root directory of your
solution
ScaffoldingGenerator generator = new ScaffoldingGenerator(
@"C:\Projects\FordVehicleProductionTracking\",
"FordVehicleProductionTracking", entityScaffoldingDetails);


It generates one of the tests with a tiny bug as shown below in the
auto-generated class BodyStylesControllerTests.cs:

/// <summary>
/// Creates a valid, transient BodyStyle; typical of something
retrieved back from a form submission
/// </summary>
private BodyStyle CreateTransientBodyStyle() {
BodyStyle bodyStyle = new BodyStyle() {
Description = "",
BodyCode = "",
OrderCode = "",
IsHybrid = False
};

return bodyStyle;
}

The bug is the line
IsHybrid = False

which should read
IsHybrid = false

More of a minor irritation than anything else.

Billy

unread,
Mar 15, 2009, 5:56:46 PM3/15/09
to S#arp Architecture
Thank you for bringing this to my attention. I have added a new issue
(http://code.google.com/p/sharp-architecture/issues/detail?id=79) to
resolve this.

Billy
Reply all
Reply to author
Forward
0 new messages