public void can_override_the_body() { theColumn.Body(CommandKey.Install); theDto = theHarness.RunColumn <Case>(theColumn, x => { x.SetValue(c => c.Id, _id); }); theDto.cell.Last().ShouldEqual(CommandKey.Install.ToString()); }
public void SetUp() { theColumn = GridColumn <Case> .ColumnFor(x => x.Condition); var harness = new ColumnFillerHarness(); harness.Formatter.Stub(x => x.GetDisplayForValue(theColumn.Accessor, theRawValue)).Return(theFormattedValue); theResultingDto = harness.RunColumn <Case>(theColumn, data => { data.SetValue(c => c.Condition, theRawValue); }); }
public void SetUp() { theColumn = new CommandColumn <Case, CaseActionModel>(CommandKey.Action); theHarness = new ColumnFillerHarness(); theDto = theHarness.RunColumn <Case>(theColumn, x => { x.SetValue(c => c.Id, _id); }); theColumnModel = theColumn.ToDictionary().Single(); }
public void SetUp() { theColumn = LinkColumn <Case> .For(x => x.Condition); theHarness = new ColumnFillerHarness(); theHarness.Formatter.Stub(x => x.GetDisplayForValue(theColumn.Accessor, theRawValue)).Return(theFormattedValue); theDto = theHarness.RunColumn <Case>(theColumn, x => { x.SetValue(c => c.Id, _id); x.SetValue(c => c.Condition, theRawValue); }); }
public void SetUp() { theColumn = GridColumn <Case> .ColumnFor(x => x.Condition).TimeAgo(); var harness = new ColumnFillerHarness(); var request = new GetStringRequest(theColumn.Accessor, theRawValue, null) { Format = "{0:s}" }; harness.Formatter.Stub(x => x.GetDisplay(request)).Return(theFormattedValue); theResultingDto = harness.RunColumn <Case>(theColumn, data => { data.SetValue(c => c.Condition, theRawValue); }); theColModel = theColumn.ToDictionary().Single(); }