diff --git a/src/Code.Library.Tests/Extensions/StringExtensionsTests.cs b/src/Code.Library.Tests/Extensions/StringExtensionsTests.cs index 93a4ee7..32171bc 100644 --- a/src/Code.Library.Tests/Extensions/StringExtensionsTests.cs +++ b/src/Code.Library.Tests/Extensions/StringExtensionsTests.cs @@ -1,8 +1,8 @@ -using System; +using Code.Library.Extensions; +using FluentAssertions; +using System; using System.Globalization; using System.Threading; -using Code.Library.Extensions; -using FluentAssertions; using Xunit; namespace Code.Library.Tests.Extensions @@ -128,6 +128,13 @@ public void ToFriendlyUrlTest() input.ToFriendlyUrl().Should().BeEquivalentTo(expected); } + [Fact] + public void TruncateAtWordTests() + { + "This is a long sentence".TruncateAtWord(6).Should().Be("This"); + "This is a long sentence".TruncateAtWord(7).Should().Be("This is"); + } + [Fact] public void UrlAvailableTest() {