コード例 #1
0
 public TextContentDto(TextContent tc, ContentElementDto ce)
 {
     TextContentId = tc.ContentValueId;
     ContentElementId = ce.ContentElementId;
     ContentStatus = tc.Status;
     Value = tc.Value;
     Language = tc.Language.LanguageId;
 }
コード例 #2
0
        public void should_update_content_value()
        {
            var contentElement = CreateDefaultContentElement();
            var content = new TextContent(Language.Invariant);
            content.SetValue("before");

            contentElement.AddValue(content);

            content = new TextContent(Language.Invariant);
            content.SetValue("after");

            contentElement.UpdateValue(content);

            TextContent result = (TextContent)contentElement.GetValue(Language.Invariant);
            result.Value.Should().Be("after");
        }