public static LegendaryActionTO ToTO(this LegendaryAction legendaryAction)
 {
     return(new LegendaryActionTO
     {
         Name = legendaryAction.Name,
         Cost = legendaryAction.Cost,
         Description = legendaryAction.Description
     });
 }
예제 #2
0
        public void GivenAnHtmlFormatter_WhenFormattingALegendaryAction_ThenFormatIsRespected()
        {
            var action = new LegendaryAction()
            {
                name = "Move",
                desc = "The vampire moves up to its speed without provoking opportunity attacks."
            };
            var expected = $"<p class=\"RWDefault\"><span class=\"RWSnippet\"><b>{action.name}.</b> {action.desc}</span></p>";

            var actual = HtmlFormatter.Format(action);

            actual.Should().Be(expected);
        }
예제 #3
0
        public static string Format(LegendaryAction action)
        {
            var descriptionWithEscapedNewLines = ReplaceEolByLineBreaks(action.desc);

            return(WrapInAParagraph($"<b>{action.name}.</b> {descriptionWithEscapedNewLines}"));
        }