private string FormatJoke(CharacterName characterName, Joke joke) { if (characterName != null) { return(joke.ReplacedName(characterName.ToString())); } else { return(joke.Value); } }
public void ReplacedWith_Should_NotReplaceName() { // Given var sut = new Joke() { Value = $"{DefaultName} says hello" }; // When var replaced = sut.ReplacedName(NewName); // Then Assert.Equal($"{DefaultName} says hello", replaced); }