public void ShouldNot_TrimNameFromTitleTag_ForInvalidInput() { //arrange string titleTag = "Emmanuel Sanders Invalid Additional Text"; IEspnHtmlTrimService espnHtmlTrimService = new EspnHtmlTrimService(); //act string playerName = espnHtmlTrimService.TrimNameFromTitleTag(titleTag); //assert playerName.Should().Be("Emmanuel Sanders Invalid Additional Text"); }
public void Should_TrimNameFromTitleTag_ForStandardInput() { //arrange string titleTag = "Emmanuel Sanders Stats, News, Bio | ESPN"; IEspnHtmlTrimService espnHtmlTrimService = new EspnHtmlTrimService(); //act string playerName = espnHtmlTrimService.TrimNameFromTitleTag(titleTag); //assert playerName.Should().Be("Emmanuel Sanders"); }