public void SearchColumnBlock() { var block = new ColumnBlock { Items = new List <Block> { new HtmlBlock { Body = new HtmlField { Value = "<p>Lorem</p>" } }, new HtmlBlock { Body = new HtmlField { Value = "<p>Ipsum</p>" } } } }; var sb = new StringBuilder(); sb.AppendLine(((HtmlBlock)block.Items[0]).Body.Value); sb.AppendLine(((HtmlBlock)block.Items[1]).Body.Value); var value = sb.ToString(); var search = block.GetIndexedContent(); Assert.Equal(value, search); }
private ColumnBlockDTO ToColumnBlockDTO(ColumnBlock columnBlock) { var result = new ColumnBlockDTO(); result.Id = columnBlock.Id; result.Name = columnBlock.Name; result.ColumnDTOs = columnBlock.ColumnMetas .Select(cm => ToColumnMetaDTO(cm)) .ToList(); return(result); }
private ColumnBlock ToColumnBlock(ColumnBlockDTO dto) { var result = new ColumnBlock(); result.Id = Guid.NewGuid(); result.Name = dto.Name; result.ColumnMetas = dto.ColumnDTOs .Select(cm => ToColumnMeta(result.Id, cm)) .ToList(); return(result); }