fmorriso
unread,Mar 13, 2009, 3:40:42 PM3/13/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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.