public void select_formatter_uses_the_default_formatter_if_one_exists() { var column = new ColumnDefinition <ColumnDefTarget, string>(x => x.Name, theProjection); var grid = MockRepository.GenerateMock <IGridDefinition>(); var defaultFormatter = new SlickGridFormatter("default"); grid.Stub(x => x.DefaultFormatter).Return(defaultFormatter); column.SelectFormatterAndEditor(grid, new ColumnPolicies()); column.Formatter().ShouldBeTheSameAs(defaultFormatter); }
public void does_not_override_an_explicit_formatter_with_the_default() { var column = new ColumnDefinition <ColumnDefTarget, string>(x => x.Name, theProjection); column.Formatter(SlickGridFormatter.TypeFormatter); var grid = MockRepository.GenerateMock <IGridDefinition>(); var defaultFormatter = new SlickGridFormatter("default"); grid.Stub(x => x.DefaultFormatter).Return(defaultFormatter); column.SelectFormatterAndEditor(grid, new ColumnPolicies()); column.Formatter().ShouldEqual(SlickGridFormatter.TypeFormatter); }
protected bool Equals(SlickGridFormatter other) { return string.Equals(_name, other._name); }
protected bool Equals(SlickGridFormatter other) { return(string.Equals(_name, other._name)); }
public void does_not_override_an_explicit_formatter_with_the_default() { var column = new ColumnDefinition<ColumnDefTarget, string>(x => x.Name, theProjection); column.Formatter(SlickGridFormatter.TypeFormatter); var grid = MockRepository.GenerateMock<IGridDefinition>(); var defaultFormatter = new SlickGridFormatter("default"); grid.Stub(x => x.DefaultFormatter).Return(defaultFormatter); column.SelectFormatterAndEditor(grid, new ColumnPolicies()); column.Formatter().ShouldEqual(SlickGridFormatter.TypeFormatter); }
public void select_formatter_uses_the_default_formatter_if_one_exists() { var column = new ColumnDefinition<ColumnDefTarget, string>(x => x.Name, theProjection); var grid = MockRepository.GenerateMock<IGridDefinition>(); var defaultFormatter = new SlickGridFormatter("default"); grid.Stub(x => x.DefaultFormatter).Return(defaultFormatter); column.SelectFormatterAndEditor(grid, new ColumnPolicies()); column.Formatter().ShouldBeTheSameAs(defaultFormatter); }