This is the model entities are converted to for sending down to the grid
예제 #1
0
        public void id_method()
        {
            var dto = new EntityDTO();
            var guid = Guid.NewGuid();

            dto["Id"] = guid.ToString();

            dto.Id().ShouldEqual(guid);
        }
예제 #2
0
        private static List <EntityDTO> createEntityDtos(IGridData data, IEnumerable <Action <EntityDTO> > actions)
        {
            var list = new List <EntityDTO>();

            while (data.MoveNext())
            {
                var dto = new EntityDTO();
                actions.Each(a => a(dto));

                list.Add(dto);
            }
            return(list);
        }
예제 #3
0
        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);
            });
        }
예제 #4
0
        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();
        }
예제 #5
0
        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());
        }